You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it works, just need to change
def init(self, input):
to
def init(self):
and declare first
self_activation_9 = Smish()
than use it as
activation_9 = self_activation_9(conv2D_1)
Mr. Professor,
When I'm trying
@tf.function
def smish(input):
return input * tf.math.tanh(tf.math.log(1+tf.math.sigmoid(input)))
class Smish(layers.Layer):
than in model declaration
self_conv2D_11 = Conv2D(16 , kernel_size=(3,3),strides=(1,1),padding = 'same')
activation_9 = Smish(conv2D_1)
conv2D_11 = self_conv2D_11(activation_9)
i got an error
TypeError: Inputs to a layer should be tensors. Got: <main.Smish object at 0x000001F82C4FE910>
Would you be so kind to give hint how to translate Smish to tensorflow ?
Thank you,
tj
The text was updated successfully, but these errors were encountered: