Skip to content

Instantly share code, notes, and snippets.

@enorms
Created November 25, 2023 06:52
Show Gist options
  • Save enorms/b51f640384b814fb3b0f4f702ad42f80 to your computer and use it in GitHub Desktop.
Save enorms/b51f640384b814fb3b0f4f702ad42f80 to your computer and use it in GitHub Desktop.
config example
# https://github.com/MinaGhadimiAtigh/hyperbolic_representation_learning/blob/main/notebooks/2_Hyperbolic_Image_Embeddings.ipynb
class Config:
def __init__(self, shot=1, lr=0.001, step=50, gamma=0.8, c=0.05, model="convnet", hyperbolic = True, dim=1600,
query=15, way=5, validation_way=5, temperature=1, dataset="CUB", lr_decay=True, max_epoch=200):
self.lr = lr # learning rate
self.lr_decay = lr_decay # Boolean, if to perform learning rate scheduler
self.step_size=step # Period of learning rate decay
self.gamma = gamma # Multiplicative factor of learning rate decay
self.dataset= dataset # Dataset name
self.model = "convnet" # Name of Base Model
self.temperature = temperature # temperature used in calculating logits
self.max_epoch=max_epoch # number of epochs
self.c = c # Curvature of the hyperbolic space
self.hyperbolic = hyperbolic # Boolean, if it is hyperbolic or not
self.dim = dim # dimenionality of the output vector
self.shot = shot # Number of shots in Few shot learning task
self.query = query #
self.way = way # Number of ways in Few shot learning task
self.validation_way = validation_way # Number of ways in Few shot learning task for validation set
args = Config(dim=512, max_epoch = 5, hyperbolic= True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment