Skip to content

How to do transfer learning with flaxmodels? #20

Closed

Description

@riven314

I am sorry to write another issue again because I am trying to apply transfer learning on ResNet using your flaxmodels.
However, I got stuck on how to get the backbone and add a new head on top of the ResNet.
Do you have any sample code/ guidance for me as a reference?

Activity

  1. riven314 commented on Feb 10, 2022

    @riven314
    Author

    I saw example of transfer learning from flaxvision: https://github.com/rolandgvc/flaxvision/blob/master/examples/transfer_learning.ipynb
    However, I feel like the script is not inheriting the pre-trained model weight in the training:

    def get_initial_params(key):
      init_shape = jnp.ones((1, 224, 224, 3), jnp.float32)
      initial_params = MyModel().init(key, init_shape)['params']
      return initial_params
    
  2. Repository owner locked and limited conversation to collaborators on Feb 10, 2022
  3. converted this issue into a discussion #21 on Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions