【问题标题】:__init__() missing 2 required positional arguments: 'op' and 'message'__init__() 缺少 2 个必需的位置参数:'op' 和 'message'
【发布时间】:2020-07-11 06:16:57
【问题描述】:
我正在使用 TensorFlow 2.2 和 Python 3.5。我无法加载 MNIST 数据集。
代码:
mnist_dataset, mnist_info = tfds.load(name='mnist', with_info=True, as_supervised=True)
错误:
init() 缺少 2 个必需的位置参数:'op' 和 'message'
【问题讨论】:
标签:
tensorflow
machine-learning
anaconda
mnist
【解决方案1】:
我建议尝试降级到 tensorflow-datasets==2.1.0。
- 转到 Anaconda 提示符
pip install tensorflow-datasets==2.1.0
- 重新启动内核,然后再次尝试您的代码
mnist_dataset, mnist_info = tfds.load(name='mnist', with_info=True, as_supervised=True)