Open
Description
Description
In order to set a mask for a GRU layer, I must declare it with GRUOptionalArgs.Mask.
But the class GRUOptionalArgs does not implement the interface IOptionalArgs (probably an omission...), so it cannot be passed to GRU.Call() !
Please note that GRU.Call() checks for a GRUOptionalArgs and does not accept an RnnOptionalArgs.
Reproduction Steps
Try to compile the following code:
GRUArgs gruArgs = new GRUArgs();
gruArgs.Units = 100;
GRU rnnLayer = new GRU(gruArgs);
GRUOptionalArgs rnnOptionalArgs = new GRUOptionalArgs();
Tensors inputs = np.zeros(new Shape(1, 10, 5))
rnnLayer.Apply(inputs, optional_args: rnnOptionalArgs);
Known Workarounds
Use an LSTM ???
Configuration and Other Information
Tensorflow.NET 0.110.4
Tensorflow.Keras 0.11.4
.Net Framework 4.7.2
Windows 11