Cast Function error

The tf.cast function doesn’t seem to be working.
It either shows this error -
cast() missing 1 required positional argument: ‘x’
or this
Cast string to float is not supported [Op:Cast].
Would appreciate it if someone shard this block of code or gave an explantion.
Thank you.

Hi @AryanDesai! Welcome to the forums for DLS Course 2.

Can you share a bit more info on what exercise are you having trouble?
tf.cast generally receives 2 arguments, the value you are trying to cast and the type you are casting to.

The public docs can be found here: tf.cast  |  TensorFlow Core v2.5.0
Maybe they help you a bit. If not, let me know and we’ll look further.

Thank you @neurogeek !
I figured out the solution. It was from Course 2 - week 3 Lab assignment ,the sigmoid computation part. I had trouble with the arguments as you mentioned. Solved it successfully . Thank you.

Awesome, great to hear!