第四讲磨刀不误砍柴工TensorFlow编程基础

测试2Tensorflow编程基础单元测试

1、单选题:
‍在计算图中,每个节点代表什么?‌
选项:
A: 数据传递
B: 控制依赖
C: 张量
D: 操作
答案: 【 操作

2、单选题:
import tensorflow as tf​node1=tf.constant(3.0,tf.float32,name=”node1”)​node2=tf.constant(4.0,tf.float32,name=”node2”)​node3=tf.add(node1,node2)​print(node3)​     运行结果是什么?​​​
选项:
A: 0
B: 7
C: 7.0
D: Tensor(“Add:0,shape(),dtype=float32)
答案: 【 Tensor(“Add:0,shape(),dtype=float32)

3、单选题:
‍import tensorflow as tf‍‍vector=tf.constant([[[1],[3]],[[5],[6]],[[7],[9]]])‍‍print(vector.get_shape())‍‍结果是?‍‍‍‍‍
选项:
A: (3,2,1)
B: (3)
C: (3,2) 
D: 3
答案: 【 (3,2,1)

4、单选题:
‎下列不是tensorflow支持的类型是?‏
选项:
A: tf.float32
B: tf.int32
C: tf.complex64
D: tf.unit16
答案: 【 tf.unit16

5、单选题:
‎node1=tf.constant(3.0,name=”node1”)的默认类型是?​
选项:
A: tf.int16
B: tf.int32

剩余75%内容付费后可查看

发表评论

电子邮件地址不会被公开。 必填项已用*标注