Skip to content

Commit 7d7f4e1

Browse files
lingbai-kongOceania2018
authored andcommitted
fix: error when set the activation parameter of keras.layers.Conv2DTranspose to null.
1 parent 80c3952 commit 7d7f4e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/TensorFlowNET.Keras/Activations.cs

+4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ static Activations()
7777

7878
public Activation GetActivationFromName(string name)
7979
{
80+
if (name == null)
81+
{
82+
return _linear;
83+
}
8084
if (!_nameActivationMap.TryGetValue(name, out var res))
8185
{
8286
throw new Exception($"Activation {name} not found");

0 commit comments

Comments
 (0)