This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
Repositories
Datasets
Forum
实训
竞赛
大数据
应用
Register
Sign In
OpenI
/
MegEngine
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
31
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
fix(mge): fix layer norm amp bug
GitOrigin-RevId:
dba691fcbf
release-1.7
Megvii Engine Team
3 years ago
parent
c674bf0e6e
commit
ca4c93dee7
1 changed files
with
3 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
imperative/python/megengine/functional/nn.py
+ 3
- 0
imperative/python/megengine/functional/nn.py
View File
@@ -1090,6 +1090,9 @@ def layer_norm(
eps_mode
)
if amp._enabled:
inp, weight, bias = cast_tensors(inp, weight, bias, promote=True)
_device = inp.device
_dtype = inp.dtype
_dim = len(inp.shape) - len(normalized_shape)
Write
Preview
Loading…
Cancel
Save