Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ketos ketos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • public_projects
  • ketosketos
  • Issues
  • #118

Closed
Open
Created May 23, 2021 by Oliver Kirsebom@kirsebomOwner

Behaviour of freeze_block and unfreeze_block

I was using the ResNet freeze_block method as follows

resnet.model.freeze_block([0,1,2,3,4,5]) #freeze all 6 blocks
# now train the model for a while ...
resnet.model.freeze_block([0,1,2,3,4,5]) #freeze only the first 5 blocks
# continue training ...

However, eventually I realized that this was the wrong use of this method. To achieve the desired result, I had to do as follows,

resnet.model.freeze_block([0,1,2,3,4,5]) #freeze all 6 blocks
# now train the model for a while ...
resnet.model.unfreeze_block([5]) #unfreeze the last block
# continue training ...

I am wondering if other users might be fooled by this too? Would it be more intuitive to implement the freeze_block in a manner so that past history of freezing layers is forgotten? Or perhaps we could add an argument to enable such use? Or at least highlight this in the doc string as a potential pitfall, e.g., via an example.

@fsfrazao what do you think?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking