File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -873,6 +873,12 @@ def get_module_class_name_for_layer_class(sig: LayerSignature) -> str:
873
873
name = name [:- len ("Layer" )]
874
874
if name .startswith ("_" ):
875
875
return name
876
+ # LayersHidden is our explicit list.
877
+ # When some layer is purely functional (is_functional), then we just make the function public
878
+ # but keep the wrapped layer maker hidden.
879
+ # When it has recurrent state, we either have a public function in case it is functional (no params),
880
+ # or if not (e.g. RecLayer, TwoDLSTMLayer), we anyway better should use explicit public wrappers.
881
+ # https://github.com/rwth-i6/returnn_common/issues/31
876
882
if layer_class .layer_class in LayersHidden or sig .is_functional () or sig .has_recurrent_state ():
877
883
return "_" + name # we make a public function for it, but the module is hidden
878
884
return name
You can’t perform that action at this time.
0 commit comments