'Consequent' object has no attribute 'shape'
时间: 2023-10-23 20:12:20 浏览: 31
This error message usually occurs when you try to access the 'shape' attribute of an object that does not have a shape attribute. The 'shape' attribute is typically used to get the dimensions of a NumPy array or a TensorFlow tensor.
To fix this error, you should check the type of the object you are trying to access the 'shape' attribute from. If the object is not an array or a tensor, then it does not have a 'shape' attribute.
If you are working with a NumPy array or a TensorFlow tensor and still getting this error, make sure that the object you are working with is actually an array or a tensor and not just a regular Python object. You can also try printing out the object to see its type and contents to make sure it is what you expect.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)