问题遇到的现象和发生背景
Python版本:3.9.12
TensorFlow版本:2.9.1
对TensorFlow的from_tensor_slices()函数进行for遍历,出现“Optimization loop failed: CANCELLED: Operation was cancelled”提示。本机中,此问题可复现。
问题相关代码,请勿粘贴截图
import tensorflow as tf
for e in tf.data.Dataset.from_tensor_slices([1, 2, 3]):
print(e)
运行结果及报错内容
我想要达到的结果
该信息提示的原因,解决或关闭此信息的方法。