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

Change loss and network structure #2

Closed
wqz960 opened this issue Apr 11, 2019 · 3 comments
Closed

Change loss and network structure #2

wqz960 opened this issue Apr 11, 2019 · 3 comments
Labels
question Further information is requested

Comments

@wqz960
Copy link

wqz960 commented Apr 11, 2019

  1. I try to run your code, but I got this:./dataset/trainset is not a valid directory and It happened in
    Traceback (most recent call last): File "preprocess.py", line 57, in <module> random_scale=RANDOM_SCALE File "/home/wqzhaha/anaconda3/envs/py36_torch_gpu/lib/python3.6/site-packages/shapedata/single_shape/dataset.py", line 161, in __init__ img_files = make_dataset(data_path) File "/home/wqzhaha/anaconda3/envs/py36_torch_gpu/lib/python3.6/site-packages/shapedata/utils.py", line 36, in make_dataset assert os.path.isdir(dir), '%s is not a valid directory' % dir AssertionError: ./data/dataset/trainset/ is not a valid directory
  2. if I want to do some experiment about changing the structure of network and changing the loss function, where should I modify?
@justusschock
Copy link
Owner

justusschock commented Apr 11, 2019

1.) I don't know your script and this isn't something I have provided, but the traceback seems to indicate that the path, which should contain your data, simply does not exist.

2.) The easiest way is to subclass the network (DeepAlignmentNetwork) and change the structure as you want to (depending on your structure, you may also have to subclass DeepAlignmentStage) and just pass other losses to the experiment (depending on your losses you maybe need to slightly adjust the closure function of your DeepAlignmentNetwork subclass)

@justusschock justusschock changed the title HI! There are some problems that need your help! Change loss and network structure Apr 11, 2019
@justusschock justusschock added the question Further information is requested label Apr 11, 2019
@wqz960
Copy link
Author

wqz960 commented Apr 11, 2019

@justusschock Really thank you for your kind respond and help! The script finally run! But it is my first time to use your delira. If I want to resume to train, how should I modify the train code?

@justusschock
Copy link
Owner

Currently, resuming is done best, if you are using the plain trainer (not the experiment as it works with a time-stamp) and pass the original savedir (including the timestep) to it. The training will then automatically be resumed

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

No branches or pull requests

2 participants