File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using static Tensorflow . Binding ;
3+
4+ namespace Tensorflow . Keras
5+ {
6+ public partial class Activations
7+ {
8+ public Activation Softmax = ( features , name )
9+ => tf . Context . ExecuteOp ( "Softmax" , name , new ExecuteOpArgs ( features ) ) ;
10+ }
11+ }
Original file line number Diff line number Diff line change 1- using Tensorflow . NumPy ;
1+ using System ;
2+ using Tensorflow . NumPy ;
23using System . Collections . Generic ;
34using Tensorflow . Keras . ArgsDefinition ;
45using Tensorflow . Keras . Engine ;
@@ -834,7 +835,8 @@ Activation GetActivationByName(string name)
834835 "relu" => keras . activations . Relu ,
835836 "sigmoid" => keras . activations . Sigmoid ,
836837 "tanh" => keras . activations . Tanh ,
837- _ => keras . activations . Linear
838+ "softmax" => keras . activations . Softmax ,
839+ _ => throw new Exception ( $ "Activation { name } not found")
838840 } ;
839841
840842 /// <summary>
You can’t perform that action at this time.
0 commit comments