You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it right to say that the consistency loss will compare the first pixel row of the first image of the training batch with the first pixel row of a random image in the target batch ?
with torch.no_grad():
targets_resize_model = F.interpolate(targets, (args.consistency_size, args.consistency_size), ....)
target_embeddings = embed(targets_resize_model) # [N_images , Width , Height]
target_emb = target_embeddings[:, 0] # from all images take the first rows
target_i = np.random.randint(target_emb.shape[0])
target_emb = target_emb[target_i] # sample a random image
rgbs_resize_c = F.interpolate(rgbs, size=(args.consistency_size, args.consistency_size), mode=args.pixel_interp_mode)
rendered_embeddings = embed(rgbs_resize_c) # [N_images , Width , Height]
rendered_embedding = rendered_embeddings[0] # get the first image
rendered_emb = rendered_embedding[0] # get the first row of pixels
consistency_loss = -torch.cosine_similarity(target_emb, rendered_emb, dim=-1)
The text was updated successfully, but these errors were encountered:
Assuming
Is it right to say that the consistency loss will compare the first pixel row of the first image of the training batch with the first pixel row of a random image in the target batch ?
The text was updated successfully, but these errors were encountered: