[Tensorflow 2.x] 기초
tensor ~= Numpy.arrays 일반적인 축 순서: tf.zeros([batch, width, height, features]) variable tensor = tf.constant([[1.0, 2.0], [3.0, 4.0]]) variable = tf.Variable(tensor, name='my_tensor') variable.assign([[1,2], [3,4]]) # same as initial variable (keep dtype) variable.assign_add([[1,1], [1,1]]) # [[2.,3.], [4.,5.,]] print(tf.Variable(tensor+1) == tf.Variable(tensor)) # [[False, False], [False, False]]..
2021. 8. 13.