Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot run the code #5

Open
GilbertFan opened this issue Aug 10, 2021 · 0 comments
Open

cannot run the code #5

GilbertFan opened this issue Aug 10, 2021 · 0 comments

Comments

@GilbertFan
Copy link

Hello
When I try to run the code with your example, the training stops at the second epoch, with the following error:

84it [00:00, ?it/s]
2021-08-10 17:33:16.937495: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
WARNING:tensorflow:Falling back from v2 loop because of error: Failed to find data adapter that can handle input: <class 'scipy.sparse.csr.csr_matrix'>, <class 'NoneType'>
Train on 84 samples
Epoch 1/1000
84/84 [==============================] - 0s 522us/sample - loss: 3.0483
Epoch 2/1000
Traceback (most recent call last):
File "master.py", line 100, in
epochs=1000
File "C:\Users\cqf99\anaconda3\envs\embedding\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 728, in fit
use_multiprocessing=use_multiprocessing)
File "C:\Users\cqf99\anaconda3\envs\embedding\lib\site-packages\tensorflow_core\python\keras\engine\training_arrays.py", line 674, in fit
steps_name='steps_per_epoch')
File "C:\Users\cqf99\anaconda3\envs\embedding\lib\site-packages\tensorflow_core\python\keras\engine\training_arrays.py", line 385, in model_iteration
ins_batch[i] = ins_batch[i].toarray()
AttributeError: 'numpy.ndarray' object has no attribute 'toarray'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant