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

Can't test the trained encoder #3

Closed
mees opened this issue Jun 2, 2017 · 5 comments
Closed

Can't test the trained encoder #3

mees opened this issue Jun 2, 2017 · 5 comments

Comments

@mees
Copy link

mees commented Jun 2, 2017

Hi,
I trained the single class encoder with ./demo_pretrain_singleclass.sh. Now I wanted to evaluate the trained models. So in eval_quant_test.lua I just changed the name of the loaded file (cnn_vol.t7) to the last trained model:
base_loader = torch.load(opt.checkpoint_dir .. 'arch_rotatorRNN_singleclass_nv24_adam2_bs8_nz512_wd0.001_lbg10_ks16/net-epoch-20.t7')
encoder = base_loader.encoder
base_voxel_dec = base_loader.voxel_dec

When I run the testcript eval_models.sh I get following error:
/home/meeso/torch/install/bin/luajit: scripts/eval_quant_test.lua:90: attempt to index global 'base_voxel_dec' (a nil value)
stack traceback:
scripts/eval_quant_test.lua:90: in main chunk
[C]: in function 'dofile'
...eeso/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406670

Any idea how I fix this?

@xcyan
Copy link
Owner

xcyan commented Jun 2, 2017 via email

@mees
Copy link
Author

mees commented Jun 2, 2017

Ah okey you are right. But it seems that in the code the encoder doesn't get loaded:

opt.basemodel_name = string.format('%s_%s_nv%d_adam%d_bs%d_nz%d_wd%g_lbg%g_ks%d',

Not sure if its the commented out lines later, but I think a torch.load() is missing somewhere in the code right? Or how can I tell him to use my trained encoder for the training?

Also, is there some method for storing a log with the train and test loss? At least this way one could see if the trained encoder is performing, or how do you monitor it?

@xcyan
Copy link
Owner

xcyan commented Jun 2, 2017 via email

@mees
Copy link
Author

mees commented Jun 2, 2017

Thanks, I also had to change the name 'rotatorRNN1_64' to 'arch_rotatorRNN'

xcyan added a commit that referenced this issue Jun 2, 2017
@xcyan
Copy link
Owner

xcyan commented Jun 2, 2017

Fixed the bug reported by @mees
8cf26ed

@xcyan xcyan closed this as completed Jun 2, 2017
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

2 participants