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

ResNet Fine-Tuning #39

Closed
Simsso opened this issue Sep 2, 2018 · 3 comments
Closed

ResNet Fine-Tuning #39

Simsso opened this issue Sep 2, 2018 · 3 comments
Assignees
Labels
code Software is relevant or involved

Comments

@Simsso
Copy link
Owner

Simsso commented Sep 2, 2018

(sub-task of #23)

After training a ResNet model from scratch (#31) and retraining Inception (#29) have not yielded satisfying results, we will try to fine-tune a ResNet with the weights provided here.

Wiki docs

The overall goal is the extraction of the ResNet model from the provided code. Then it can be used for experiments such as the insertion of layers, addition of VQ (#25), etc. All of that with accuracies from 60 to 70%.

@Simsso
Copy link
Owner Author

Simsso commented Sep 10, 2018

Model Transfer

Transfer of the ALP model to our source code.

Links

Findings / Minutes

  • we managed to transfer the original ResNet code (see above) to a cleaner implementation using the template (also above)
  • after a few fixes, we restored the pre-trained weights and achieved the 70% accuracy
  • next, we added an operation with a custom variable to the graph, which will be required once we add experiments to make the model more robust
    • as expected, it initially didn't work, because the variable was declared inside of the same scope that the rest of the graph was initialized in - so the tf.train.Saver attempted to restore its value from the pre-trained weights, too
    • hence, we searched for a way to initialize our own variables in a different scope:
def init_model():
   with tf.variable_scope('custom_scope') as custom_scope:
      pass 
   with tf.variable_scope('resnet_v2_50', ...):   #  this scope is restored 
      #  resnet graph definition
      with tf.variable_scope(custom_scope, auxiliary_name_scope=False):
         # this will *not* be a child of the resnet_v2_50 scope
         net = some_custom_op(net)
      # rest of the resnet graph definition

@Simsso
Copy link
Owner Author

Simsso commented Sep 14, 2018

This issues does not have clear work items. Please go ahead and close it, if you agree, @FlorianPfisterer.

@Simsso Simsso removed the work-item Tasks label Sep 14, 2018
@FlorianPfisterer
Copy link
Collaborator

I agree, we track the progress on the overall task in other issues, like #42, #47, #49, #48.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Software is relevant or involved
Projects
None yet
Development

No branches or pull requests

2 participants