Python
1
File “/home/XXX/Code/…”, line 50, in init
self.input_shape = input_shape
File “/home/XXX/.local/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py”, line 1639, in setattr
super(Layer, self).setattr(name, value)
AttributeError: can’t set attribute
- 解决方案
被赋值的变量与super的属性重名了,且其不是一个setter,更改一下变量名,改为“self.inputShape = input_shape”就可以了。
参考链接
2
Pycharm/Python OpenCV and CV2 install error
ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)
ERROR: No matching distribution found for cv2
- 解决方案
You are getting those errors because opencv and cv2 are not the