Skip to content

Instantly share code, notes, and snippets.

@bhuvanakundumani
Created November 30, 2021 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhuvanakundumani/dc933afece8dcebdcf841a73b84666e1 to your computer and use it in GitHub Desktop.
Save bhuvanakundumani/dc933afece8dcebdcf841a73b84666e1 to your computer and use it in GitHub Desktop.
def cl_init(cls, config):
"""
Contrastive learning class init function.
"""
cls.pooler_type = args.pooler_type
cls.pooler = Pooler(args.pooler_type)
cls.mlp = MLPLayer(config)
cls.sim = Similarity(temp=args.temp)
cls.init_weights()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment