I am struggling to implement an activation function in tensorflow in Python.
The code is the following:
def myfunc(x):
if (x > 0):
return 1
return 0
But I am always getting the error:
Using a
tf.Tensor
as a Pythonbool
is not allowed. Useif t is not None: