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

Seems like a little bug with variable type #1

Open
hcl14 opened this issue Sep 30, 2017 · 0 comments
Open

Seems like a little bug with variable type #1

hcl14 opened this issue Sep 30, 2017 · 0 comments

Comments

@hcl14
Copy link

hcl14 commented Sep 30, 2017

Using cuDNN version 5110 on context None                                                                                                                                
Mapped name None to device cuda: GeForce GTX 1050 (0000:01:00.0)                                                                                                        
Start                                                                                                                                                                   
Done loading data, using 0:00:00.252650.                                                                                                                                
Start initializing RNN...                                                                                                                                               
Done constructing the recurrent nueral network.                                                                                                                         
                                                                                                                                                                        
Start training RNN...                                                                                                                                                   
Traceback (most recent call last):                                                                                                                                      
  File "run_RNN.py", line 228, in <module>                                                                                                                              
    main()                                                                                                                                                              
  File "run_RNN.py", line 224, in main                                                                                                                                  
    batchsize=1, epoch=100, save_prob=True)
  File "run_RNN.py", line 202, in run_RNN_model
    int_str_map, dropout_rate, batchsize, epoch, valid_ratio)
  File "run_RNN.py", line 137, in train_RNN
    valid_speakers = rand_speakers[:valid_n]
TypeError: slice indices must be integers or None or have an __index__ method

Did the following fix(line 134):

valid_n = int(round(len(speakers) * valid_ratio))

Now network seems to train, not sure about the results:

Using cuDNN version 5110 on context None
Mapped name None to device cuda: GeForce GTX 1050 (0000:01:00.0)
Start
Done loading data, using 0:00:00.285182.
Start initializing RNN...
Done constructing the recurrent nueral network.

Start training RNN...
        Now: 1; costs (train): 0.9778 ; costs (valid): 0.9751
        Edit distance (valid): 46.0000

        Now: 2; costs (train): 0.9438 ; costs (valid): 0.8955
        Edit distance (valid): 46.0000

        Now: 3; costs (train): 0.8517 ; costs (valid): 0.8872
        Edit distance (valid): 42.6667

        ...

        Now: 98; costs (train): 0.1586 ; costs (valid): 0.1378
        Edit distance (valid): 4.6667

        Now: 99; costs (train): 0.1643 ; costs (valid): 0.1342
        Edit distance (valid): 4.0000

        Now: 100; costs (train): 0.1637 ; costs (valid): 0.1203
        Edit distance (valid): 5.3333

Done training, using 0:05:37.977827.

Predicting on test set...
Done, Using 0:05:39.937291.

BTW, Also, could not start with numpy 1.11.1 from requirements.txt, needed to upgrade to 1.13 and Theano 0.9. (Ubuntu 16.04). Had the following error message and fail to import numpy:

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

(however, looks like virtualenv on my system tries to access global packages, i.e. Theano 0.9, as it immediately used GPU after installation. So do not report that as a separate issue).

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