2026年机器学习算法TensorFlowPyTorch精讲试题集.docxVIP

  • 0
  • 0
  • 约5.75千字
  • 约 15页
  • 2026-09-10 发布于福建
  • 举报

2026年机器学习算法TensorFlowPyTorch精讲试题集.docx

第PAGE页共NUMPAGES页

2026年机器学习算法TensorFlowPyTorch精讲试题集

一、单选题(每题2分,共20题)

说明:下列每题只有一个正确答案。

1.TensorFlow中,用于构建计算图的顶级API是?

A.TensorFlow2.x的EagerExecution

B.`tf.data.Dataset`

C.`tf.keras.Model`

D.`tf.Graph`

2.PyTorch中,以下哪个函数用于在GPU上执行模型?

A.`torch.cpu()`

B.`torch.cuda()`

C.`model.to(cuda)`

D.`torch.device(cuda)`

3.在TensorFlow中,如何定义一个可训练的变量?

A.`tf.constant()`

B.`tf.Variable()`

C.`tf.assign()`

D.`tf.placeholder()`

4.PyTorch中,以下哪个模块提供了线性层的实现?

A.`torch.nn.ReLU`

B.`torch.nn.Linear`

C.`torch.nn.MaxPool2d`

D.`torch.nn.BatchNorm1d`

5.TensorFlow中,用于优化模型的损失函数是?

A.`tf.keras.losses`

B.

文档评论(0)

1亿VIP精品文档

相关文档