microsoft / EdgeML

This repository provides code for machine learning algorithms for edge devices developed at Microsoft Research India.
Other
1.57k stars 368 forks source link

Exception: FastGRNNCUDA is supported only on GPU devices. #232

Closed mehreenjabeen closed 3 years ago

mehreenjabeen commented 3 years ago

Getting error "Exception: FastGRNNCUDA is supported only on GPU devices." upon running kws-demo.py

ShikharJ commented 3 years ago

@mehreenjabeen I'm assuming your system has a GPU setup? Can you provide the sample command you ran and the full output?

mehreenjabeen commented 3 years ago

i ran this command: "python kws_demo.py --config_path --model_path --mean_path --std_path " However, I had trained the model with architecture argument set as "-architecture FastGRNNCUDA". Now I am retraining with architecture parameter set to FastGRNN. Hope that resolves the issue

mehreenjabeen commented 3 years ago

the above thing didnt work(i.e chaging architecture from FastGRNNCUDA to FastGRNN ) So command i ran "python3 kws-demo.py --config_path /home/mehreen/Work/EdgeML/EdgeML/config.json --model_path /home/mehreen/Work/EdgeML/EdgeML/examples/pytorch/FastCells/KWS-training/model/FastGRNN128KeywordSpotter.pt --mean_path $MODEL_DIR/mean.npy --std_path $MODEL_DIR/std.npy"

Output: sigmoid tanh Traceback (most recent call last): File "kws-demo.py", line 202, in fastgrnn = create_model(config.model, num_filt, 35) File "/home/mehreen/Work/EdgeML/EdgeML/examples/pytorch/FastCells/KWS-training/train_classifier.py", line 420, in create_model model_config.update_nonlinearity, num_keywords) File "/home/mehreen/.local/lib/python3.6/site-packages/edgeml_pytorch/trainer/fastmodel.py", line 59, in init for l in range(self.num_layers)]) File "/home/mehreen/.local/lib/python3.6/site-packages/edgeml_pytorch/trainer/fastmodel.py", line 59, in for l in range(self.num_layers)]) File "/home/mehreen/.local/lib/python3.6/site-packages/edgeml_pytorch/graph/rnn.py", line 1121, in init raise Exception('FastGRNNCUDA is supported only on GPU devices.') Exception: FastGRNNCUDA is supported only on GPU devices.

ShikharJ commented 3 years ago

@MJ10 Can you please take a look at this?

ShikharJ commented 3 years ago

@MJ10 Ping

mehreenjabeen commented 3 years ago

I am closing this issue as I got to know what the issue was. In config.json the model architecture was set to FastGRNNCuda because of which it was throwing the error. I changed it to Fastgrnn and it worked!