Skip to content

Commit 5801566

Browse files
MPnoyOceania2018
authored andcommitted
Keras layer activations fix
1 parent c8643c4 commit 5801566

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/TensorFlowNET.Keras/Activations/Activations.Sigmoid.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ public partial class Activations
1717
return results[0];
1818
}
1919

20-
throw new NotImplementedException("");
20+
var _op = tf.OpDefLib._apply_op_helper("Sigmoid", name: name, args: new { x = features });
21+
22+
return _op.output;
2123
};
2224
}
2325
}

src/TensorFlowNET.Keras/Activations/Activations.Tanh.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ public partial class Activations
1717
return results[0];
1818
}
1919

20-
throw new NotImplementedException("");
20+
var _op = tf.OpDefLib._apply_op_helper("Tanh", name: name, args: new { x = features });
21+
22+
return _op.output;
2123
};
2224
}
2325
}

0 commit comments

Comments
 (0)