Python中TypeError: __init__() missing 2 required positional arguments

hhu_luqi hhu_luqi 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我想运行下GitHub上tensorflow关于Mnist数据集的训练代码,运行在Python 3.5.2的环境下,在Spyder上。
代码文件见于
https://github.com/tensorflow/models/blob/master/official/mnist/mnist.py
运行提示mnist.py中出现TypeError: __init__() missing 2 required positional arguments: 'inputs' and 'outputs'.
求助各位大神问题出在哪?如何更正?

红色箭头所指行即为IPython console提示出错的行。
...全文

相关推荐

django报错:add_atr() takes 0 positional arguments but 1 was given

TypeError at /add_atr/ add_atr() takes 0 positional arguments but 1 was given Request Method: GET Request URL: http://127.0.0.1:8000/add_stu/ Django Version: 3.0.3 Exception Type: TypeError Exception Value: add_atr() takes 0 positional arguments but 1 was given Exception Location: E:\env\django9\lib

weixin_38531788

MNE-Python : TypeError: today() takes no keyword arguments

运行代码 在使用MNE读取gdf文件时 import mne %matplotlib inline # Mention the file path to the dataset path = "E:\\BCICIV_2b\\gdf_format\\" filename = "B0302T" raw = mne.io.read_raw_gdf(path+filename+".gdf") 出现问题 出现下面问题 TypeError Traceback (most recent call last) in 7 filename = "B0302T" 8 ----> 9

weixin_38516863

Python 出现错误TypeError: ‘NoneType’ object is not iterable解决办法

主要介绍了Python 出现错误TypeError: ‘NoneType’ object is not iterable解决办法的相关资料,需要的朋友可以参考下

weixin_38692202

Passing arguments to Python functions

深入讲解了python函数传参的原理,值得一看

xieheng84

TypeError: ‘required’ is an invalid argument for positionals 的解决方法

TypeError: ‘required’ is an invalid argument for positionals 的解决方法 当我在使用argparse模块时,遇到了如下错误: import argparse parser = argparse.ArgumentParser(description = 'debug_example') parser.add_argument ('--data_root', default = 'data/path', type = str, required=False, help = 'the dataset path') parser.add_ar

weixin_38645208
评论 4
收藏 已收藏
分享
返回顶部
hhu_luqi
脚本语言 37,738 成员 34,208 内容