11using Newtonsoft . Json ;
22using System . Collections . Generic ;
3- using Tensorflow . Keras . Layers . Rnn ;
3+ using Tensorflow . Keras . Layers ;
44
5- namespace Tensorflow . Keras . ArgsDefinition . Rnn
5+ namespace Tensorflow . Keras . ArgsDefinition
66{
77 // TODO(Rinne): add regularizers.
88 public class RNNArgs : AutoSerializeLayerArgs
@@ -23,16 +23,22 @@ public class RNNArgs : AutoSerializeLayerArgs
2323 public int ? InputDim { get ; set ; }
2424 public int ? InputLength { get ; set ; }
2525 // TODO: Add `num_constants` and `zero_output_for_mask`.
26-
26+ [ JsonProperty ( "units" ) ]
2727 public int Units { get ; set ; }
28+ [ JsonProperty ( "activation" ) ]
2829 public Activation Activation { get ; set ; }
30+ [ JsonProperty ( "recurrent_activation" ) ]
2931 public Activation RecurrentActivation { get ; set ; }
32+ [ JsonProperty ( "use_bias" ) ]
3033 public bool UseBias { get ; set ; } = true ;
3134 public IInitializer KernelInitializer { get ; set ; }
3235 public IInitializer RecurrentInitializer { get ; set ; }
3336 public IInitializer BiasInitializer { get ; set ; }
37+ [ JsonProperty ( "dropout" ) ]
3438 public float Dropout { get ; set ; } = .0f ;
39+ [ JsonProperty ( "zero_output_for_mask" ) ]
3540 public bool ZeroOutputForMask { get ; set ; } = false ;
41+ [ JsonProperty ( "recurrent_dropout" ) ]
3642 public float RecurrentDropout { get ; set ; } = .0f ;
3743 }
3844}
0 commit comments