MusicTransformer-pytorch icon indicating copy to clipboard operation
MusicTransformer-pytorch copied to clipboard

CUDA out of memory

Open Rane90 opened this issue 4 years ago • 2 comments

RuntimeError: CUDA out of memory. Tried to allocate 1024.00 MiB (GPU 0; 10.73 GiB total capacity; 9.03 GiB already allocated; 946.69 MiB free; 221.61 MiB cached)

I get this error, possibly by of my machine. Any idea how to solve this?

Rane90 avatar Oct 26 '20 14:10 Rane90

Either buy a new GPU, or decrease the model parameters. The following configuration worked for me, in config/base.yml

experiment: 'embedding128-layer2'                                                                                                                                     
max_seq: 1024
embedding_dim: 128
num_layers: 2
event_dim: 388
fp16:

In config/generate.yml

save_path: 'bin/generated.mid'
condition_file:
length: 300
threshold_len: 200

Then run python train.py -c config/base.yml config/generate.yml config/train.yml -m model_dir

adamoudad avatar Nov 29 '20 23:11 adamoudad

Thank you!

Rane90 avatar Nov 30 '20 15:11 Rane90