add binary

This commit is contained in:
leewlving 2024-01-18 16:57:29 +08:00
parent 7671b4496e
commit 0f7414bc5f
1 changed files with 1 additions and 4 deletions

View File

@ -62,12 +62,9 @@ def main(cfg: DictConfig) -> None:
num_epochs = cfg.optim.num_epochs
criterion = nn.CrossEntropyLoss()
max_loss=nn.MarginRankingLoss(0.1)
clip_loss=CLIPLoss().to(device)
loss_fn_vgg = lpips.LPIPS(net='vgg').to(device)
# vgg_loss=VggLoss().to(device)
# summary(model, input_size = (3, 256, 256), batch_size = 5)
# set_requires_grad(model.mlp.parameters())
optimizer = optim.SGD(model.mlp.parameters()+model.noise_mlp.parameters(), lr=cfg.classifier.lr, momentum=cfg.classifier.momentum)
start_time = time.time()