Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large encoder and decoder model #25

Open
deepcode123 opened this issue Nov 3, 2016 · 5 comments
Open

Large encoder and decoder model #25

deepcode123 opened this issue Nov 3, 2016 · 5 comments

Comments

@deepcode123
Copy link

Hi,
I trained both encoder and decoder, I got the large model.net. Encoder model is about 400M; decoder model is 19M. Both of these are much larger than yours, are these normal or something wrong?

First, I trained encoder:
th run.lua --dataset cs --datapath /home/janice/Pictures/Cityscapes --model models/encoder.lua --save /home/janice/Documents/ENet-training/train/trained/encoder_model/ --imHeight 256 --imWidth 512 --labelHeight 32 --labelWidth 64 --cachepath /home/janice/Documents/ENet-training/train/trained/encoder_dataset_cache/ --nGPU 1 --learningRate 5e-4 --weightDecay 2e-4 --batchSize 5

Then I trained decoder:
th run.lua --dataset cs --datapath /home/janice/Pictures/Cityscapes/ --model models/decoder.lua --save /home/janice/Documents/ENet-training/train/trained/decoder_model/ --imHeight 256 --imWidth 512 --labelHeight 256 --labelWidth 512 --cachepath /home/janice/Documents/ENet-training/train/trained/decoder_dataset_cache/ --nGPU 1 --learningRate 5e-4 --weightDecay 2e-4 --batchSize 5 --CNNEncoder /home/janice/Documents/ENet-training/train/trained/encoder_model/model-best.net

Thanks!!

@Mina1368
Copy link

Mina1368 commented Nov 5, 2016

Hi,

Would you please say how much memory on GPU it is required to run the model?

Thank You

@deepcode123
Copy link
Author

hi, @Mina1368
about 820MB when I run the trained model
Thanks!

@culurciello
Copy link
Member

save model as:

torch.save('filename.t7', model:clearState())

to make model take less disk space for deployment

@deepcode123
Copy link
Author

deepcode123 commented Nov 8, 2016

hi, @culurciello
I saved model in this way:

torch.save(filename, model:clearState():get(1))

or in this way:

model:clearState()
torch.save(filename, model)

both of these are the same for encoder, about 400M

I also tried "torch.save('filename.t7', model:clearState())"
but it's still the same, about 400M

Do you have any idea?
Thanks!

@FrancisGee
Copy link

When I want to trian ENet in Cityscape Dataset or Camvid Dataset, how much GPU memory should I use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants