Browse Source

fix: error when set the activation parameter of keras.layers.Conv2DTranspose to null.

tags/v0.110.0-LSTM-Model
lingbai-kong Haiping 2 years ago
parent
commit
7d7f4e1182
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/TensorFlowNET.Keras/Activations.cs

+ 4
- 0
src/TensorFlowNET.Keras/Activations.cs View File

@@ -77,6 +77,10 @@ namespace Tensorflow.Keras


public Activation GetActivationFromName(string name) public Activation GetActivationFromName(string name)
{ {
if (name == null)
{
return _linear;
}
if (!_nameActivationMap.TryGetValue(name, out var res)) if (!_nameActivationMap.TryGetValue(name, out var res))
{ {
throw new Exception($"Activation {name} not found"); throw new Exception($"Activation {name} not found");


Loading…
Cancel
Save