2026年人工智能训练师(二级)实操考核真题及答案.docx

2026年人工智能训练师(二级)实操考核真题及答案.docx

2026年人工智能训练师(二级)实操考核真题及答案

2026年人工智能训练师(二级)实操考核真题及答案

1.单选题(每题2分,共20分)

1.1在PyTorch2.3中,若需将模型参数从float32自动转换为bfloat16且保持梯度稳定性,下列哪段代码最符合AMP最佳实践?

A.model.to(torch.bfloat16);torch.autocast(device_type=cuda,dtype=torch.bfloat16)

B.withtorch.cuda.amp.autocast(dtype=torch.bfloat16):output=model(inpu

文档评论(0)

1亿VIP精品文档

相关文档