johnb30 / py_crepe

Keras implementation of the Crepe character-level convolutional neural net.
74 stars 33 forks source link

How long does it take to run another dataset? #9

Open inyeongpark opened 7 years ago

inyeongpark commented 7 years ago

Hello I am a student interested in cnn. I'd like to run with another datasets on this paper. However, the ag_news was calculated using gpu titan x with other keras code. It took a long time. How long has it took you to calculate? If you used a different set of data, how did you solve the memory error? And how long did it take?

Thank you very much..

liufuyang commented 6 years ago

I am trying to running this code as well and did some update so to let it be able to run on newer version of Keras and with a TF backend.

With a 1080Ti, I could get ag_news model learned in a few minutes (1 or 2 minutes an epoch, and after 4 or 5 epoch I get accuracy on test above 0.87).

You might want to look my out put here https://github.com/liufuyang/py_crepe/blob/master/log.example.txt

ayrtondenner commented 6 years ago

Hello @liufuyang, you got 96% test accuracy, right? Could you post your Keras, TensorFlow and Python version? Also, how did you print this organized log?

liufuyang commented 6 years ago

@ayrtondenner no. If you read the log:

60s 503us/step - loss: 0.1122 - acc: 0.9619 - val_loss: 0.4629 - val_acc: 0.8736

You can see that the test accuracy, or val_acc is 0.87. 0.96 acc is on train set.

About version info you can check here again (seems to be Python library Keras(v2.1.5), using the Tensorflow-gpu(v1.6) backend.): https://github.com/liufuyang/py_crepe

About the organised log, I simply used the some high level Keras training API. So the code looks much simpler than the original repo here.

You can take a look at this: https://github.com/liufuyang/py_crepe/blob/master/main.py

ayrtondenner commented 6 years ago

Ops, my bad. You got 87% in validation, I used the network and got 87% in test accuracy, so it seems ok. I will try to run it again using cmd instead of through Python, so I can run using GPU and passing THEANO_FLAGS parameters. I will also check your code, thanks.