You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i try to running the code,the ide reoprt this
Traceback (most recent call last):
File "/home/heiwater/Note/ML/Lenet5/LeNet-5-with-Keras/lenet_5.py", line 19, in <module>
sample = sample.reshape([28,28])
File "/home/heiwater/.local/lib/python3.8/site-packages/pandas/core/generic.py", line 5465, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'Series' object has no attribute 'reshape'
i had tried search it on google,some of then said chage the code in line26
from
Hey @Heiwater, if you look at the error code it clearly states the variable sample is the Pandas series. Pandas series does not have attribute reshape associated with it. What you could do is instead of
sample = sample.reshape([28,28]) on line 19 change the sample to numpy array
sample = np.array(sample).reshape([28,28])
This should work for you as numpy array has the attribute reshape
just as the title saying
when i try to running the code,the ide reoprt this
i had tried search it on google,some of then said chage the code in line26
from
to
but it dosn't work
i have already try to run it on the Windows 10 and Ubuntu 20.04,they report the same error
and my python version is 3.8.5 my panda version is 1.2.3
it's my pleasure if some one can help me :)
The text was updated successfully, but these errors were encountered: