Browse Source

fix(module): remove assert during forward

GitOrigin-RevId: bb04d861a3
release-1.5
Megvii Engine Team huangxinda 3 years ago
parent
commit
0c97b2a3ec
1 changed files with 0 additions and 1 deletions
  1. +0
    -1
      imperative/python/megengine/module/normalization.py

+ 0
- 1
imperative/python/megengine/module/normalization.py View File

@@ -136,7 +136,6 @@ class LayerNorm(Module):

def forward(self, x):
x_shape = x.shape
assert x_shape[-len(self.normalized_shape) :] == self.normalized_shape
dim_delta = len(x_shape) - len(self.normalized_shape)
non_flatten_shape = x_shape[:dim_delta]
x = x.reshape(*non_flatten_shape, -1)


Loading…
Cancel
Save