Shortcuts

PrepareProtoBeforeValLoopHook

class mmpretrain.engine.hooks.PrepareProtoBeforeValLoopHook[source]

The hook to prepare the prototype in retrievers.

Since the encoders of the retriever changes during training, the prototype changes accordingly. So the prototype_vecs needs to be regenerated before validation loop.