NervanaSystems / deepspeech

DeepSpeech neon implementation
Apache License 2.0
222 stars 69 forks source link

Error [ModuleNotFoundError: No module named 'neon'] when execute statement to train the model #28

Closed duongquangduc closed 7 years ago

duongquangduc commented 7 years ago

Hi, I faced the error when executing statement to train the model. Here is the details:

user@ubuntu:~/deepspeech/speech$ python train.py --manifest train:/home/ducdq/deepspeech/librispeech/train-clean-100/train-manifest.csv --manifest val:/home/ducdq/deepspeech/librispeech/dev-clean/val-manifest.csv -e10 -z10 -s /home/ducdq/neon/mnist.pkl

Output: Traceback (most recent call last): File "train.py", line 24, in from neon.backends import gen_backend ModuleNotFoundError: No module named 'neon'

I though I installed neon. user@ubuntu:~/neon$ . .venv/bin/activate (.venv2) user@ubuntu:~/neon$ neon examples/mnist_mlp.yaml Epoch 0 [Train |████████████████████| 469/469 batches, 0.26 cost, 1.98s] Epoch 1 [Train |████████████████████| 469/469 batches, 0.19 cost, 2.00s] Epoch 2 [Train |████████████████████| 469/469 batches, 0.17 cost, 2.07s] Epoch 3 [Train |████████████████████| 468/468 batches, 0.15 cost, 2.00s] Epoch 4 [Train |████████████████████| 468/468 batches, 0.13 cost, 2.01s] Epoch 5 [Train |████████████████████| 468/468 batches, 0.11 cost, 2.04s] Epoch 6 [Train |████████████████████| 468/468 batches, 0.10 cost, 2.03s] Epoch 7 [Train |████████████████████| 468/468 batches, 0.08 cost, 2.03s] Epoch 8 [Train |████████████████████| 468/468 batches, 0.07 cost, 2.03s] Epoch 9 [Train |████████████████████| 468/468 batches, 0.06 cost, 2.03s] (.venv2) user@ubuntu:~/neon$ python examples/mnist_mlp.py Epoch 0 [Train |████████████████████| 469/469 batches, 0.24 cost, 1.85s] Epoch 1 [Train |████████████████████| 469/469 batches, 0.19 cost, 2.04s] Epoch 2 [Train |████████████████████| 469/469 batches, 0.15 cost, 2.12s] Epoch 3 [Train |████████████████████| 468/468 batches, 0.13 cost, 2.10s] Epoch 4 [Train |████████████████████| 468/468 batches, 0.11 cost, 2.11s] Epoch 5 [Train |████████████████████| 468/468 batches, 0.10 cost, 2.11s] Epoch 6 [Train |████████████████████| 468/468 batches, 0.09 cost, 2.13s] Epoch 7 [Train |████████████████████| 468/468 batches, 0.09 cost, 2.10s] Epoch 8 [Train |████████████████████| 468/468 batches, 0.08 cost, 2.12s] Epoch 9 [Train |████████████████████| 468/468 batches, 0.07 cost, 2.11s] 2017-05-09 09:06:42,158 - neon - DISPLAY - Misclassification error = 2.4% (.venv2) user@ubuntu:~/neon$ ls bin LICENSE neon setup.cfg ChangeLog loader neon.egg-info setup.py CONTRIBUTING.rst Makefile pylintrc tests doc MANIFEST.in pytest.ini tox.ini examples mnist.pkl README.md tox_requirements.txt gpu_requirements.txt mnist.pkl.gz requirements.txt vis_requirements.txt

tyler-nervana commented 7 years ago

To run train.py you must be in the neon virtual environment first. Just run source /neon/.venv/bin/activate (or whatever your local path happens to be), and you should be good to go.

duongquangduc commented 7 years ago

Thank Tyler!

I passed the step. Though I faced this error when started training the model. Please see the snapshot as below. Could you please suggest if there is something wrong in my statement? image

Statement: neon$ python /home/ducdq/deepspeech/speech/train.py --manifest train:/home/ducdq/deepspee(.venv2) ducdq@WS1088:~/neon$ python /home/ducdq/deepspeech/speech/train.py --manifest train:/home/ducdq/deepspeech/librispeech/train-clean-100/train-manifest.csv --manifest val:/home/ducdq/deepspeech/librispeech/dev-clean/val-manifest.csv -e10 -z128 -s /home/ducdq/neon/mnist.pkl

Error message: 2017-05-15 16:51:23,476 - neon.util.argparser - WARNING - No schedule given for model serialization, using default 1 2017-05-15 16:51:23,477 - neon.backends - WARNING - deterministic_update and deterministic args are deprecated in favor of specifying random seed Traceback (most recent call last): File "/home/ducdq/deepspeech/speech/train.py", line 186, in cost=cost, callbacks=callbacks) File "/home/ducdq/neon/neon/models/model.py", line 182, in fit self._epoch_fit(dataset, callbacks) File "/home/ducdq/neon/neon/models/model.py", line 213, in _epoch_fit self.optimizer.optimize(self.layers_to_optimize, epoch=epoch) File "/home/ducdq/deepspeech/speech/gdmnesterov.py", line 44, in optimize grad = self.clip_gradient_value(grad, self.gradient_clip_value) AttributeError: 'GradientDescentMomentumNesterov' object has no attribute 'clip_gradient_value'

Thanks!

tyler-nervana commented 7 years ago

Bah, that's a problem with a new release of neon that changed a few things before we propagated those changes into this repo. If you update your deepspeech repo to the newest master it should work fine.

duongquangduc commented 7 years ago

Now, I can start training the model. Thank you for the support!

tyler-nervana commented 7 years ago

I'm glad to hear it.