models
Models
¶
Bases: BaseContainer
A container with some functions specific to models that have optimizable parameters.
Source code in pytorch_adapt\containers\models.py
4 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 |
|
eval()
¶
Sets all models to eval mode.
Source code in pytorch_adapt\containers\models.py
17 18 19 20 21 22 |
|
to(device)
¶
Moves all models to device
.
Source code in pytorch_adapt\containers\models.py
31 32 33 34 35 36 |
|
train()
¶
Sets all models to train mode.
Source code in pytorch_adapt\containers\models.py
10 11 12 13 14 15 |
|
zero_grad()
¶
Zeros the gradients in all models.
Source code in pytorch_adapt\containers\models.py
24 25 26 27 28 29 |
|