同样一个代码放到两个不同项目里一个无法运行
发布于2021-03 浏览:2458 回复:6
0
收藏

我是做了同样一个代码,放到两个不同项目里,其中一个summary无法运行,报错内容如下,

AttributeError Traceback (most recent call last) in
----> 1 paddle.summary(model,(-1,3,256,256))
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/hapi/model_summary.py in summary(net, input_size, dtypes)
109 in_train_mode = False
110 else:
--> 111 in_train_mode = net.training
112
113 if in_train_mode:
AttributeError: 'Model' object has no attribute 'training'

收藏
点赞
0
个赞
共6条回复 最后由若风坠星沉回复于2021-06
#7若风坠星沉回复于2021-06

Traceback (most recent call last)/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
2897 try:
-> 2898 return self._engine.get_loc(casted_key)
2899 except KeyError as err:
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtabl

我是这样的报错,不知道楼主具体是怎么更正的

0
#6七年期限回复于2021-03

先别Model  先查看 在Model

1
#5七年期限回复于2021-03

方式不对

1
#4189******30回复于2021-03

嗯 summary 在2.0正式版和rc里确实不一样了

0
#3回复于2021-03
#2 189******30回复
看看是不是paddle版本不一致

这个解决了,是API的使用方式不对

0
#2189******30回复于2021-03

看看是不是paddle版本不一致

0
TOP
切换版块