question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can you explain how to run properly with Theano build?

See original GitHub issue

Hi! I love your blog! I’m trying to try this on my own machine for a class project, but I’m running into some problems running the program correctly. I’m new to python so I don’t know exactly how to run it, but after configuring the correct dependencies, I still ran into some issues trying it for myself. Here are the parameters I used for the Theano combined CNN RNN project:

`# TODO: add argument to choose training set parser.add_argument(‘–network’, type=str, default=“tc_net_mod”, help=‘embeding size (50, 100, 200, 300 only)’) parser.add_argument(‘–epochs’, type=int, default=500, help=‘number of epochs to train’)

parser.add_argument(‘–load_state’, type=str, default=“”, help=‘state file path’)

parser.add_argument(‘–mode’, type=str, default=“train”, help=‘mode: train/test/test_on_train’)

parser.add_argument(‘–batch_size’, type=int, default=32, help=‘no commment’)

parser.add_argument(‘–l2’, type=float, default=0, help=‘L2 regularization’)

parser.add_argument(‘–log_every’, type=int, default=100, help=‘print information every x iteration’)

parser.add_argument(‘–save_every’, type=int, default=50000, help=‘save state every x iteration’)

parser.add_argument(‘–prefix’, type=str, default=“”, help=‘optional prefix of network name’)

parser.add_argument(‘–dropout’, type=float, default=0.0, help=‘dropout rate (between 0 and 1)’)

parser.add_argument(‘–no-batch_norm’, dest=“batch_norm”, action=‘store_false’, help=‘batch normalization’)

parser.add_argument(‘–rnn_num_units’, type=int, default=500, help=‘number of hidden units if the network is RNN’)

parser.add_argument(‘–equal_split’, type=bool, default=False, help=‘use trainEqual.csv and valEqual.csv’)

parser.add_argument(‘–forward_cnt’, type=int, default=1, help=‘if forward pass is nondeterministic, then how many forward passes are averaged’)`

I chose to keep everything mostly default except the first argument where I replace “network_batch” with “tc_net_mod” because I get an error otherwise.

Specifically, I don’t know what the file path should be for this argument: parser.add_argument('--load_state', type=str, default="", help='state file path') When I try the .Zip folder with the training data from the Topcoder competition, I get this error:

Traceback (most recent call last): File "C:/Users/Alex/PycharmProjects/Spoken-language-identification/theano/main.py", line 76, in <module> start_epoch = network.load_state(args.load_state) + 1 File "C:\Users\Alex\PycharmProjects\Spoken-language-identification\theano\networks\base_network.py", line 23, in load_state dict = pickle.load(load_file) cPickle.UnpicklingError: A load persistent id instruction was encountered, but no persistent_load function was specified.

I really want to see if I can get this working, It would be great if you could show a how-to guide 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
hrayrharcommented, Aug 15, 2016

Hi, sorry for late response, load_state argument is designed for loading a state file of some network (not for data). If you want to run the code, you should download dataset from TopCoder, create the spectrograms of recordings, split them into train and validation sets and then change the paths which are used for loading data in main.py file.

0reactions
hrayrharcommented, Aug 30, 2016

The last softmax layer has 176 neurons. When the cross entropy is calculated, it needs the true labels to be integers from [0, 176). In your mapping from languages to integers you used numbers greater than 175. This is the mapping I used (I didn’t push these files because, as I remember, the training data was not open). I’n not sure the code will work on Windows, I haven’t tested on Windows. On the other hand, as it fails to calculate the cross entropy (which means it has already forwarded an example successfully) probably it will work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theano Tutorial
This is an introductory Theano tutorial. It covers the basic concepts and will help readers get started on building neural network models.
Read more >
Developer Start Guide - Theano - Read the Docs
To run the test suite with the default options, see How to test that Theano works properly. Each night we execute all the...
Read more >
Configuring Theano For High Performance Deep Learning
First, open a terminal and run the following commands to make sure your OS is up-to-date. sudo apt-get update sudo apt-get upgrade sudo...
Read more >
A beginner's guide to Theano for Deep Learning
This guide to Theano is aimed towards beginners. People who want to lean Deep Learning can benefit from it as it provides the...
Read more >
Some Basic Concepts of Theano
To have Theano work on the GPU as well, a GPU backend library is required on your system. CUDA library (for NVIDIA GPU...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found