- 
 
- 
  Notifications
 You must be signed in to change notification settings 
- Fork 1.8k
Commit 4d20629
Add encoder_freeze method to SegmentationModel (#1220)
* Add encoder_freeze method
* Add encoder freeze/unfreeze methods and override train()
* Fix typo
* Remove unnecessary print
* Refactor _set_encoder_trainable
Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>
* Add tests for encoder freezing
* Add assertion on running_var
* Refactor test_freeze_and_unfreeze_encoder
Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>
* Refactor test and add call to eval
* add example for encoder freezing
---------
Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>1 parent e76ed01 commit 4d20629
File tree
3 files changed
+163
-0
lines changed- docs
- segmentation_models_pytorch/base
- tests/base
3 files changed
+163
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
|  | |||
| 117 | 117 |  | |
| 118 | 118 |  | |
| 119 | 119 |  | |
| 120 | + | ||
| 121 | + | ||
| 122 | + | ||
| 123 | + | ||
| 124 | + | ||
| 125 | + | ||
| 126 | + | ||
| 127 | + | ||
| 128 | + | ||
| 129 | + | ||
| 130 | + | ||
| 131 | + | ||
| 132 | + | ||
| 133 | + | ||
| 134 | + | ||
| 135 | + | ||
| 136 | + | ||
| 137 | + | ||
| 138 | + | ||
| 139 | + | ||
| 140 | + | ||
| 141 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
|  | |||
| 24 | 24 |  | |
| 25 | 25 |  | |
| 26 | 26 |  | |
| 27 | + | ||
| 28 | + | ||
| 29 | + | ||
| 30 | + | ||
| 27 | 31 |  | |
| 28 | 32 |  | |
| 29 | 33 |  | |
|  | |||
| 137 | 141 |  | |
| 138 | 142 |  | |
| 139 | 143 |  | |
| 144 | + | ||
| 145 | + | ||
| 146 | + | ||
| 147 | + | ||
| 148 | + | ||
| 149 | + | ||
| 150 | + | ||
| 151 | + | ||
| 152 | + | ||
| 153 | + | ||
| 154 | + | ||
| 155 | + | ||
| 156 | + | ||
| 157 | + | ||
| 158 | + | ||
| 159 | + | ||
| 160 | + | ||
| 161 | + | ||
| 162 | + | ||
| 163 | + | ||
| 164 | + | ||
| 165 | + | ||
| 166 | + | ||
| 167 | + | ||
| 168 | + | ||
| 169 | + | ||
| 170 | + | ||
| 171 | + | ||
| 172 | + | ||
| 173 | + | ||
| 174 | + | ||
| 175 | + | ||
| 176 | + | ||
| 177 | + | ||
| 178 | + | ||
| 179 | + | ||
| 180 | + | ||
| 181 | + | ||
| 182 | + | ||
| 183 | + | ||
| 184 | + | ||
| 185 | + | ||
| 186 | + | ||
| 187 | + | ||
| 188 | + | ||
| 189 | + | ||
| 190 | + | ||
| 191 | + | ||
| 192 | + | ||
| 193 | + | ||
| 194 | + | ||
| 195 | + | ||
| 196 | + | ||
| 197 | + | ||
| 198 | + | ||
| 199 | + | ||
| 200 | + | ||
| 201 | + | ||
| 202 | + | ||
| 203 | + | ||
| 204 | + | ||
| 205 | + | ||
| 206 | + | ||
| 207 | + | ||
| 208 | + | ||
| 209 | + | ||
| 210 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
|  | |||
| 1 | + | ||
| 2 | + | ||
| 3 | + | ||
| 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 | + | ||
| 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 | + | ||
| 64 | + | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + | ||
| 69 | + | ||
| 70 | + | ||
0 commit comments