In this exe I tried to implement the function but I got some error. please help me how can I solve. this part.

" # YOUR CODE STARTS HERE

```
z = tf.cast("z", tf.float32)
a = tf.keras.activations.sigmoid("z")
```

#
YOUR CODE ENDS HERE "

this is what I write.

Hi @bhargav_shah and welcome to Discourse. Can you post the error you got? The function `tf.keras.activations.sigmoid`

, documented at: tf.keras.activations.sigmoid Ā |Ā TensorFlow Core v2.4.1, receives on input a tensor. I am not sure āzā is a valid input to it. Is this the error you get?

Hello, @yanivh , Problem solved there is a just very small mistake I am writing this way . z = tf.cast(āzā, tf.float32)ā¦ a = tf.keras.activations.sigmoid(āzā) but just remove the double inverted commas and problem solve.

5 Likes

There must be a variable in the bracket

1 Like

pass it as parameter not string will work