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
Simply run the command: pip install -r requirements.txt
Running the models
To train and test a model simply run the file the model is contained in. If you wish to change any hyper parameters, you can alter the batch size when the train and test loaders are initialized, the learning rate in the function train_model when the optimizer is defined, and the number of epochs is a parameter of the train_model
Helper Functions
def custom_collate_fn(batch)
Made a custom collation file because DeepLake has a default collation method but that tries to stack tensors from each batch.
But this doesn't work well in our case as the labels vary in length. So, this function, instead of stacking the tensors,
gathers the values for each key into a list. This prevents the run time errors that were occurring from attempting to
stack the tensors.
Each image is associated with a variable number of labels, but the code required consistency, so this function is used to
convert these variable length label lists into a fixed length multi-hot vectors. In a multi-hot vector each position
corresponds to a particular class and a value of 1 indicates that the class is present
About
Deep Learning Project in Collaboration with Craig Roberts and Jason Zou