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

Export model issue for netAug #26

Open
DasMadhureeta opened this issue Nov 17, 2022 · 0 comments
Open

Export model issue for netAug #26

DasMadhureeta opened this issue Nov 17, 2022 · 0 comments

Comments

@DasMadhureeta
Copy link

Hi,

While exporting the tiny model from a large model, I found there was an accuracy drop. Can you clarify this part? Is there anything that needs to do before exporting the model once the training is done?
For this part-
if use_netaug:
checkpoint = load_state_dict_from_file(os.path.join(checkpoint_path, "best.pt"))
model.module.load_state_dict(checkpoint)
model.eval()
model.module.set_active(mode="min")
with torch.no_grad():
model.module(
torch.zeros(
1,
3,
exp_config["data_provider"]["image_size"],
exp_config["data_provider"]["image_size"],
).cuda()
)
export_model = model.module.export()
if dist.is_master():
torch.save(
{"state_dict": export_model.state_dict()},
os.path.join(checkpoint_path, "target.pt"),
_use_new_zipfile_serialization=False,
)

@DasMadhureeta DasMadhureeta changed the title Export model issue Export model issue for netAug Nov 17, 2022
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

No branches or pull requests

1 participant