Comments (3)
To add to this, even when i seem to set up the gpu and config perfectly and without errors, it just doesn't run at all, and is obviously still using the CPU. Here are two runs: the first i use the gpu device and the second i use the cpu
ubuntu@ip-10-13-207-39:/mnt/frankie/optimus$ time python train.py sample/configs/sampleNonStaticConfig.json sample/datasets/sst_small_sample.csv sample/myFirstModel.p true
Using gpu device 0: GRID K520
Converted word vectors to word_idx_map
Converted the dataset into matrix. Num Rows = 300 Num labels = 2
Parameters for model: [('image shape', 64, 300), ('filter shape', [(100, 1, 3, 300), (100, 1, 4, 300), (100, 1, 5, 300)]), ('hidden_units', []), ('dropout', 0.5), ('batch_size', 50), ('learn_decay', 0.95), ('conv_non_linear', u'relu'), ('mode', u'nonstatic'), ('sqr_norm_lim', 9), ('shuffle_batch', True), ('n_epochs', 5)]
epoch 1, train perf 65.600000 %, val perf 48.000000
epoch 2, train perf 50.800000 %, val perf 40.000000
epoch 3, train perf 50.800000 %, val perf 40.000000
epoch 4, train perf 56.400000 %, val perf 44.000000
epoch 5, train perf 88.400000 %, val perf 68.000000
Training finished. Best model is at sample/myFirstModel.p
real 1m26.142s
user 1m24.769s
sys 0m1.841s
__________________AND WITH CPU ...
ubuntu@ip-10-13-207-39:/mnt/frankie/optimus$ nano ~/.theanorc
ubuntu@ip-10-13-207-39:/mnt/frankie/optimus$ time python train.py sample/configs/sampleNonStaticConfig.json sample/datasets/sst_small_sample.csv sample/myFirstModel.p true
Converted word vectors to word_idx_map
Converted the dataset into matrix. Num Rows = 300 Num labels = 2
Parameters for model: [('image shape', 64, 300), ('filter shape', [(100, 1, 3, 300), (100, 1, 4, 300), (100, 1, 5, 300)]), ('hidden_units', []), ('dropout', 0.5), ('batch_size', 50), ('learn_decay', 0.95), ('conv_non_linear', u'relu'), ('mode', u'nonstatic'), ('sqr_norm_lim', 9), ('shuffle_batch', True), ('n_epochs', 5)]
epoch 1, train perf 65.600000 %, val perf 48.000000
epoch 2, train perf 50.800000 %, val perf 40.000000
epoch 3, train perf 50.800000 %, val perf 40.000000
epoch 4, train perf 56.400000 %, val perf 44.000000
epoch 5, train perf 88.400000 %, val perf 68.000000
Training finished. Best model is at sample/myFirstModel.p
real 1m26.366s
user 1m24.861s
sys 0m1.906s
from optimus.
The code should work seamlessly on GPUs. I have tested it. The only changes you have to make are for Theano. (E.g. FloatX=float32 and device=gpu0). Seems from your outputs, you were able to run on GPUs. You won't see GPU speedup on such a small dataset. This is because some time is spent on setting up GPUs, copying data from CPU memory to GPU memory, etc.
Did you try on a larger dataset?
from optimus.
Hi, Thanks for notifying this! There actually was a bug when using GPUs. Using floatX = float64 is not the correct solution and makes it use CPUs. This should be fixed now.
from optimus.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from optimus.