Rate this Page

torch.fx.experimental.migrate_gradual_types.constraint_generator.add_layer_norm_constraints#

torch.fx.experimental.migrate_gradual_types.constraint_generator.add_layer_norm_constraints(input_dim, normalized_dim)[source]#

The constraints say that the type has the form: [*, 1024, 1024] while the normalized_dim have the form [1024, 1024].

Parameters:
  • input_dim (list[DVar]) – Input shape of layer norm

  • normalized_dim (list[int]) – normalized_dim parameter of the module instance

Return type:

list[Constraint]