《动手学深度学习》-E2-2
1. 创建TensorFlow
一、
x1 = tf.constant(range(12))
x2 = tf.constant([1,2,3],[1,2,3])
x3 = tf.reshape(x1,(3,4))
x4 = tf.zeros((2,3,4))
x5 = tf.ones((2,3,4))
<tf.Tensor: id=5, shape=(2, 3, 4), dtype=float32, numpy=
array([[[0., 0., 0., 0.],
[0., 0.,
原创
2020-12-07 16:57:30 ·
133 阅读 ·
0 评论