https://www.youtube.com/watch?v=PwYnZ2RwyJw&list=PLfLgtT94nNq1DrREU_qG2w4yd2ZzJb-FG&index=8
위 tensorflow 강좌를 보고 아래와 같이 코딩했습니다.
Mac m1 pro 환경에 콘다 가상환경으로 구동중이고 텐서플로우 버전은 2.11.0입니다
import tensorflow as tf
height = 170
shoe_size = 260
a = tf.Variable(0.1)
b = tf.Variable(0.2)
def loss():
predicted_value = height * a + b
return tf.square(260 - predicted_value)
opt = tf.keras.optimizers.Adam(learning_rate = 0.1)
opt.minimize(loss, var_list=[a,b]). # 반복하기 전
오류가 나는데 내용은
minimize에서 var_list 에 대한 오류인것 같은데
구글 colab에서는 오류없이 잘 작동 합니다.
무엇이문제인가요...?