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

cannot instantiate SegmentationKS for training #3

Open
kashefy opened this issue Feb 26, 2016 · 3 comments
Open

cannot instantiate SegmentationKS for training #3

kashefy opened this issue Feb 26, 2016 · 3 comments
Assignees
Labels

Comments

@kashefy
Copy link
Member

kashefy commented Feb 26, 2016

Hey @chrschy, I was trying out demo for training SegmentationKS and ran into an error. The constructor checks if the model file exists and produces an error if it cannot find it. This happens here.

In order to train SegmentationKS I would still need to create an instance and it will not get past this line. Or am I missing something?

If this is indeed the case, I was thinking we could

  1. pass a flag to the constructor to indicate that we're instantiating the object in "train mode" and skip this check accordingly.
  2. Turn the train method into a static method or a factory method that does not need the object.

Option 1 seems simpler. What do you think?

@hagenw
Copy link
Member

hagenw commented Feb 29, 2016

Hi @kashefy,

what exactly did you run to produce your error?

When I go to the segmentation folder of TWOEARS/examples and run demo_train_segmentation everything runs fine for me.

@kashefy
Copy link
Member Author

kashefy commented Feb 29, 2016

Hi @hagenw,
I'm working off of demo_train_segmentation as well. I get the error when changing one of the KS's parameters.

A change of parameters involves re-training the KS. Changing the parameters changes the object's reqHashs attribute. The hash value determines the model filename. If you run the train script without changing the parameters you are basically re-training an existing model. In this case the constructor finds the existing model and no errors occur. I changed the nChannels parameter from 16 to 32. I think this leads to a different hash value for which a model does not exist yet.

I wanted to change nChannels to better align with the features parameters required for the IdentityKS downstream.

@hagenw
Copy link
Member

hagenw commented Feb 29, 2016

Yes, I can recreate this. Change nChannels after running the demo (in my case from 32 to 16) results in:

>> demo_train_segmentation
Downloading file https://dev.qu.tu-berlin.de/projects/twoears-database/repository/revisions/master/raw//learned_models/SegmentationKS/DemoKS/DemoKS_models_66cc1d312cb06e04624ffd91283691a0d6d3ec028e79306c718aee17dd2b922b.mat
Error using SegmentationKS (line 168)
No trained models are available for this KS. Please ensure to run KS training first.

Error in demo_train_segmentation (line 33)
segKS = SegmentationKS(ksName, ...

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

No branches or pull requests

3 participants