我是做了同样一个代码,放到两个不同项目里,其中一个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
个赞
请登录后评论
TOP
切换版块
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
我是这样的报错,不知道楼主具体是怎么更正的
先别Model 先查看 在Model
方式不对
嗯 summary 在2.0正式版和rc里确实不一样了
这个解决了,是API的使用方式不对
看看是不是paddle版本不一致