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
Copy file name to clipboardExpand all lines: docs/source/usage.rst
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,9 +265,8 @@ For standard usage we recommend the default values (i.e., ``InfoNCE`` and ``cosi
265
265
266
266
.. rubric:: Temperature :py:attr:`~.CEBRA.temperature`
267
267
268
-
:py:attr:`~.CEBRA.temperature` has the largest effect on visualization of the embedding (see :py:doc:`cebra-figures/figures/ExtendedDataFigure2`). Hence, it is important that it is fitted to your specific data.
268
+
:py:attr:`~.CEBRA.temperature` has the largest effect on *visualization* of the embedding (see :py:doc:`cebra-figures/figures/ExtendedDataFigure2`). Hence, it is important that it is fitted to your specific data. A more smooth embedding will be achieved with a temperature set to 0.1, while 1.0 will be more "clustered".
269
269
270
-
The simplest way to handle it is to use a *learnable temperature*. For that, set :py:attr:`~.CEBRA.temperature_mode` to ``auto``. :py:attr:`~.CEBRA.temperature` will be trained alongside the model.
271
270
272
271
🚀 For advance usage, you might need to find the optimal :py:attr:`~.CEBRA.temperature`. For that we recommend to perform a grid-search.
273
272
@@ -307,7 +306,8 @@ Here is an example of a CEBRA model initialization:
307
306
cebra_model = CEBRA(
308
307
model_architecture = "offset10-model",
309
308
batch_size = 1024,
310
-
temperature_mode="auto",
309
+
temperature_mode='constant',
310
+
temperature=0.1,
311
311
learning_rate = 0.001,
312
312
max_iterations = 10,
313
313
time_offsets = 10,
@@ -321,7 +321,7 @@ Here is an example of a CEBRA model initialization:
@@ -568,7 +568,8 @@ We provide a simple hyperparameters sweep to compare CEBRA models with different
568
568
learning_rate = [0.001],
569
569
time_offsets = 5,
570
570
max_iterations = 5,
571
-
temperature_mode = "auto",
571
+
temperature_mode='constant',
572
+
temperature = 0.1,
572
573
verbose = False)
573
574
574
575
# 2. Define the datasets to iterate over
@@ -820,7 +821,7 @@ It takes a CEBRA model and returns a 2D plot of the loss against the number of i
820
821
Displaying the temperature
821
822
""""""""""""""""""""""""""
822
823
823
-
:py:attr:`~.CEBRA.temperature` has the largest effect on the visualization of the embedding. Hence it might be interesting to check its evolution when ``temperature_mode=auto``.
824
+
:py:attr:`~.CEBRA.temperature` has the largest effect on the visualization of the embedding. Hence it might be interesting to check its evolution when ``temperature_mode=auto``. We recommend only using `auto` if you have first explored the `constant` setting.
824
825
825
826
To that extend, you can use the function :py:func:`~.plot_temperature`.
0 commit comments