Hi @Stephen_Lee

Welcome to the TensorFlow Forum!

You are not adding the var_list in the minimize() which could be the reason of the error.
Please modify this line as below and try again running the code:

train = optimizer.minimize(error,var_list=[weights, bias])

Note: Please put the issue code in the code format not as image. This will be easy for us and community to replicate the given code and fix the error.

1 Like