Skip to content

Init weights #46

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Init weights #46

wants to merge 2 commits into from

Conversation

acerioni
Copy link
Member

No description provided.

@acerioni acerioni requested a review from a team May 28, 2025 13:19
Copy link
Member

@GwenaelleSa GwenaelleSa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few WIP comments left.
The new parameter in the config files should be described in the readme of the repo.

Comment on lines +118 to +121
## Get the config file of parameters to a execute a given task with a deep learning framework. Can be used to generate the default parameter value
# cfg.merge_from_file(model_zoo.get_config_file(MODEL_ZOO_CHECKPOINT_URL))
# print(cfg)
# sys.exit(1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines should be deleted or implemented.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one can be deleted.

@@ -127,8 +132,19 @@ def main(cfg_file_path):
cfg.SOLVER.MAX_ITER = 500

# ---- do training
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(MODEL_ZOO_CHECKPOINT_URL)
if INIT_MODEL_WEIGHTS:
# A common error that might occur is that the lr is too high: https://trello.com/c/BY4HtY9h#comment-673616d755b046983033e24f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it relevant to keep a trello ref here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this comment for you to know, but if you want to publish it, it should be deleted.

if INIT_MODEL_WEIGHTS:
# A common error that might occur is that the lr is too high: https://trello.com/c/BY4HtY9h#comment-673616d755b046983033e24f
cfg.MODEL.WEIGHTS = ""
logger.info("The weights of the pre-trained model are reinitialize. Training from scratch.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"reinitialized" with d

Comment on lines +143 to +147
## Visualize model parameters
# print(len(list(trainer.model.parameters())))
# for p in trainer.model.parameters():
# print(p)
# sys.exit(0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines should be deleted or implemented.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be this one can be implemented as an option.

Copy link
Contributor

@cleherny cleherny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want me to make the change here? Or do you?
Anyway, I'd like to modify the post-processing script for the quarry example to make it consistent with the proj-dqry. So I can make the change directly in this branch if it's easier.

@@ -127,8 +132,19 @@ def main(cfg_file_path):
cfg.SOLVER.MAX_ITER = 500

# ---- do training
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(MODEL_ZOO_CHECKPOINT_URL)
if INIT_MODEL_WEIGHTS:
# A common error that might occur is that the lr is too high: https://trello.com/c/BY4HtY9h#comment-673616d755b046983033e24f
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this comment for you to know, but if you want to publish it, it should be deleted.

Comment on lines +118 to +121
## Get the config file of parameters to a execute a given task with a deep learning framework. Can be used to generate the default parameter value
# cfg.merge_from_file(model_zoo.get_config_file(MODEL_ZOO_CHECKPOINT_URL))
# print(cfg)
# sys.exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one can be deleted.

Comment on lines +143 to +147
## Visualize model parameters
# print(len(list(trainer.model.parameters())))
# for p in trainer.model.parameters():
# print(p)
# sys.exit(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be this one can be implemented as an option.

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

Successfully merging this pull request may close these issues.

3 participants