Skip to content

What exactly is Ref_emb and how to use it? #417

Answered by cwkeam
117CCC asked this question in Q&A
Discussion options

You must be logged in to vote

The way VICReg works is that, if you have embeddings like you said:

embeddings = model(data)

You create an augmentation

aug_embs = model(AUG(data))

where AUG is some augmentation function, then use the loss:

loss = loss_fn(embeddings, ref_emb=aug_embs)

This AUG(data) could be something like flipping the image, cropping the image, color jittering the image, and such, in the example of computer vision. The whole idea is that you want your model to produce aug_embs as close as possible to embeddings.

In more abstract terms, let's say data is some RGB image. Then:

embeddings = model(image)
embeddings_2 = model(FLIP_IMAGE(image))

loss = loss_fn(embeddings, embeddings_2)
# where the loss re…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cwkeam
Comment options

@117CCC
Comment options

Answer selected by 117CCC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants