mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Make LayerNorm.normalized_shape a tuple
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20832 Pulled By: driazati Differential Revision: D15464693 fbshipit-source-id: 244f24d6917b17dde5e33ff852c716fb053b7ca5
This commit is contained in:
committed by
Facebook Github Bot
parent
99b3f5cd70
commit
9c57d8df42
@ -135,7 +135,7 @@ class LayerNorm(Module):
|
||||
super(LayerNorm, self).__init__()
|
||||
if isinstance(normalized_shape, numbers.Integral):
|
||||
normalized_shape = (normalized_shape,)
|
||||
self.normalized_shape = torch.Size(normalized_shape)
|
||||
self.normalized_shape = tuple(normalized_shape)
|
||||
self.eps = eps
|
||||
self.elementwise_affine = elementwise_affine
|
||||
if self.elementwise_affine:
|
||||
|
Reference in New Issue
Block a user