OCELoss
Bases: Module
Source code in cellulus/criterions/oce_loss.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
__init__(temperature, regularization_weight, density, num_spatial_dims, device)
Class definition for loss.
Parameters
temperature:
Factor used to scale the gaussian function and control
the rate of damping.
regularization_weight:
The weight of the L2 regularizer on the object-centric embeddings.
density:
Determines the fraction of patches to sample per crop,
during training.
num_spatial_dims:
Should be equal to 2 for 2D and 3 for 3D.
device:
The device to train on.
Set to 'cpu' to train without GPU.
Source code in cellulus/criterions/oce_loss.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|