TensorFlow.NET icon indicating copy to clipboard operation
TensorFlow.NET copied to clipboard

Conv2D Keras is ambiguous

Open NiklasGustafsson opened this issue 5 years ago • 2 comments

In the Keras Layer API, there are two versions of Conv2D, one which identifies activations, initializers, and regularizers by name, and one that identifies them symbolically. When relying on default values for all these, the two are ambiguous, so you have to supply at least one of these arguments, even with the default.

For example:

 var conv = keras.layers.Conv2D(filters, kernel_size: 3, activation: "linear");

This is not onerous, by any means, but it is a little bit annoying.

NiklasGustafsson avatar Feb 25 '21 22:02 NiklasGustafsson

I prefer to keep string version, look more neat and consistent with python convention. We can remve the strong type version in the future.

Oceania2018 avatar Feb 25 '21 23:02 Oceania2018

I also prefer the string version. The other version offers the benefit of being able to use custom initializers, for example.

NiklasGustafsson avatar Feb 26 '21 04:02 NiklasGustafsson