python报错分析
qfqf123456
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
true_fn和false_fn输出的dtype类型不一致怎么办
使用预训练的facenet模型在验证集上跑,中间报了个类型不匹配的错误:原始:当前的话是一个uint8,一个是float32. image = tf.cond(get_control_flag(control[0], RANDOM_ROTATE), lambda:tf.compat.v1.py_func(random_rotate_image, [image], tf.uint8),#这里是uint8原创 2021-03-10 12:14:16 · 609 阅读 · 0 评论 -
deepXplore-运行时报错:the following arguments are required: transformation, weight_diff...(参数)
解决方法看图:‘–’,和设置默认值修改后,在需要修改的参数,前面加上‘–’,default值加上,参照截图:原创 2021-01-03 19:41:48 · 795 阅读 · 1 评论 -
pycharm中unresolved reference怎么解决(配置问题)
unresolved reference怎么解决解决方法:进入PyCharm->Settings->Build,Excution,Deployment->Console->Python Console勾选上Add source roots to PYTHONPATH;进入PyCharm->Settings->Project->Project Structure,通过选中某一目录右键添加sources;点击Apply和OK即可。...原创 2021-01-03 18:51:54 · 61577 阅读 · 9 评论 -
python报错:‘NoneType‘ object has no attribute ‘group‘
@[python报错’NoneType’ object has no attribute ‘group’],这个错误是‘NoneType’对象没有group模块,就是没有匹配到值。以下代码为例:res = re.match('^W\d','WYF123')print(res.group())‘^’表示匹配行首,'\d'表示匹配数字0-9,所以,合起来应该是返回行首数字,否则返回空,空类型对象不能使用group()方法。这个没匹配到值,所以报错了修改后:res = re.match(’^12原创 2021-01-03 09:44:58 · 25104 阅读 · 1 评论 -
os.mkdir(‘C:\\a\\b‘) FileNotFoundError: [WinError 3] 系统找不到指定的路径
c盘下a,b文件夹都不存在,不能使用mkdir(),要使用makedirs()os.mkdir(‘C:\a\b’)修改为 os.makedirs(r’C:\a\b’)原创 2021-01-02 09:10:44 · 670 阅读 · 0 评论 -
python运行报错:‘NoneType‘ object is not callable
NoneType’ object is not callable:空类型对象不可调用:调用了装饰器函数,但是装饰器函数没有返回值,导致使用的函数报错,参照代码的注释@timmer#引用装饰器等于test1()=timmer(func),所以timmer(func)没有return值得时候,导致test1()没有值,报错NoneType’ object is not callable import timedef timmer(func): def warraper(*args,**kwarg原创 2020-12-27 11:25:30 · 9876 阅读 · 0 评论
分享