题目内容 (请给出正确答案)
[单选题]

对下列程序段的执行结果,描述错误的是 。 import tensorflow as tf x = tf.constant([1., 4., 9., 16.]) pow(x, 0.5)

A.pow(x, 0.5)的作用是对张量x逐元素求平方根

B.其结果为[1., 2., 3., 4.]

C.张量数据类型为float32

D.输出张量的shape为(1,)

查看答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“对下列程序段的执行结果,描述错误的是 。 import te…”相关的问题

第1题

执行下列程序段,结果为______。 import tensorflow as tf x = tf.Variable(tf.constant([5, 6, 7])) x.assign([1, 2, 3]) x.assign_add([3, 2, 1]) print(x.numpy()) print(x.trainable)

A、[4 4 4] True

B、[8 8 8] True

C、[8 8 8] 报错

D、[4 4 4] 报错

点击查看答案

第2题

执行下列程序段,对其结果描述错误的是 。 import tensorflow as tf tf.random.truncated_normal(shape=(2, 2), mean=0.0, stddev=2.0)

A、生成的张量中可能出现[-4,4]以外的点

B、每次运行的结果都不同

C、生成的随机张量形状为(2, 2)

D、生成的随机张量的数据类型为float32

点击查看答案

第3题

下面程序段的执行结果为 。 import tensorflow as tf a = tf.range(6) a1 = tf.reshape(a, [2, 3]) b = tf.constant([[7, 8, 9], [10, 11, 12]]) b1 = tf.gather(b, axis=1, indices=[1, 2, 0]) c = a1*b1 print(c.numpy())

A、[[ 0 9 16] [30 48 55]]

B、[[ 0 8 0] [30 44 0]]

C、[[ 0 9 14] [33 48 50]]

D、[[ 0 8 18] [30 44 60]]

点击查看答案

第4题

执行下面程序段,运行结果是______。 import tensorflow as tf x = tf.Variable(4.) with tf.GradientTape() as tape: y = tf.square(x) dy_dx = tape.gradient(y, x) print(y.numpy(),dy_dx.numpy())

A、8.0 16.0

B、16.0 4.0

C、8.0 4.0

D、16.0 8.0

点击查看答案

第5题

运行下面程序,结果正确的是_______。 import tensorflow as tf import numpy as np tf.constant(np.array([1.0, 2.0]))

A、<tf.tensor: id="9," shape="(2,)," dtype="float64," numpy="array([1.," 2.])>

B、<tf.tensor: id="9," shape="(1,2)," dtype="float64," numpy="array([1.," 2.])>

C、<tf.tensor: id="9," shape="(2,)," dtype="float32," numpy="array([1.," 2.])>

D、<tf.tensor: id="9," shape="(2,1)," dtype="float32," numpy="array([1.," 2.])>

点击查看答案

第6题

下面程序的执行结果是______。 import tensorflow as tf import numpy as np x = tf.Variable(np.random.randn(3, 1)) print(x.dtype)

A、float32

B、float64

C、int64

D、int32

点击查看答案

第7题

下列程序的执行结果为______。 import tensorflow as tf import numpy as np a = tf.Variable(np.array([2., 1.])) b = tf.Variable([4., 3.], dtype = tf.float64) print(a.dtype, b.dtype)

A、(tf.float32, tf.float64)

B、(tf.float64, tf.float32)

C、(tf.float64, tf.float64)

D、(tf.float32, tf.float32)

点击查看答案

第8题

TensorFlow中使用什么来描述计算过程?

A、数据流图

B、会话

C、参数

D、张量

点击查看答案

第9题

以下关于TensorFlow库的应用领域的描述,正确的选项是()。
A.机器学习

B.数据可视化

C.Web开发

D.文本分析

点击查看答案
热门考试 全部 >
相关试卷 全部 >
账号:
你好,尊敬的上学吧用户
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信