Comments (5)
So, I googled a bit and found the solution. Tensorflow, keras by default takes all the available GPUs. If we want to avoid that then we can tweak the settings. Just for your information, following are the links to how that can be done,
keras-team/keras#6031
https://www.tensorflow.org/programmers_guide/using_gpu
Also, we can run the program as,
python <program_name> --num_gpus=<no._of_GPUs_u_want_2_allocate>
This will take the first 2 GPUs for execution as tensorflow considers GPUs in numeric order.
from nmt-keras.
Thank you so much for your help. I made following changes as per your suggestion and I am able to train.
MAX_INPUT_TEXT_LEN = 100
MAX_OUTPUT_TEXT_LEN = 100
INPUT_VOCABULARY_SIZE = 50000
OUTPUT_VOCABULARY_SIZE = 50000
BATCH_SIZE = 50
However, I didn't find any option for setting the parameters like gpuid or multiple gpuids etc. Please let me know if there is any way to put a control on the use of GPUs. The above experiment that I told was running on 3 GPUs but still showed 10 hours for completing just one epoch. I don't think it should take that much time because in the past I had run few experiments on OpenNMT backend using the same corpus and it didn't take so much time.
Thank you.
from nmt-keras.
It seems you have a way too large vocabulary (394054 words!).
You must use a shortlist of the vocabulary (e.g. keep the top-K frequent words, mapping the rest to an unknown token). You can easily set this with the INPUT_VOCABULARY_SIZE
and OUTPUT_VOCABULARY_SIZE
options.
Moreover, the options MAX_INPUT_TEXT_LEN = 11351
MAX_OUTPUT_TEXT_LEN = 7898
indicate the max number of words allowed in each sentence. You probably want to reduce this number (to e.g. 80 words (this depends on your corpora).
Finally, I recommend you to have a look to sub-word preprocessing methods, such as byte-pair-encoding, which are effective when dealing with large vocabularies.
from nmt-keras.
This is probably related to your Keras'/Tensorflow configuration.
I've never tried multi-gpu configuration, but on a single GPU, it should work.
from nmt-keras.
Thanks for the info ^^
from nmt-keras.
Related Issues (20)
- Support for Factored Models ? HOT 1
- consume long time for predicting validation output HOT 3
- Confusion with opennmt-tf HOT 1
- Missing auto setup of required packages for running this library HOT 1
- How to use pretrained word2vec embeddings? HOT 1
- Getting error index out of range when training a Transformer model HOT 10
- Using CPU for inference with GPU-trained model HOT 20
- Evaluating perplexity HOT 4
- Getting error when using Tensorboard HOT 2
- Save perplexity on training and validation sets HOT 5
- Regd Rare Words/OOV Tokens ? HOT 9
- Sampling decoding HOT 1
- Strange behavior with plotting metrics for validation HOT 2
- Issue with ensemble scoring method HOT 3
- AssertionError: Reduction function "Noam" unimplemented! HOT 1
- Data Error ? HOT 6
- Detecting multiple GPUs HOT 9
- Training Error HOT 1
- Conversion to TFJS HOT 1
- Example Colab Fails HOT 1
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 nmt-keras.