diff --git a/src/TensorFlowNET.Keras/Activations.cs b/src/TensorFlowNET.Keras/Activations.cs index 00de728f..d6d8e391 100644 --- a/src/TensorFlowNET.Keras/Activations.cs +++ b/src/TensorFlowNET.Keras/Activations.cs @@ -77,6 +77,10 @@ namespace Tensorflow.Keras public Activation GetActivationFromName(string name) { + if (name == null) + { + return _linear; + } if (!_nameActivationMap.TryGetValue(name, out var res)) { throw new Exception($"Activation {name} not found");