File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -146,10 +146,7 @@ def __init__(
146
146
self .schedule = schedule
147
147
self .log_batches_per_epoch = log_batches_per_epoch
148
148
self .log_samples_per_batch = log_samples_per_batch
149
- if chkpt_path is not None :
150
- self .model .load_state_dict (
151
- torch .load (chkpt_path )["state_dict" ], strict = False
152
- ) # loading only weights
149
+
153
150
self .training_step_outputs = []
154
151
self .validation_step_outputs = []
155
152
# required to log the graph
@@ -166,6 +163,10 @@ def __init__(
166
163
self .test_cellpose_model_path = test_cellpose_model_path
167
164
self .test_cellpose_diameter = test_cellpose_diameter
168
165
self .test_evaluate_cellpose = test_evaluate_cellpose
166
+ if chkpt_path is not None :
167
+ self .load_state_dict (
168
+ torch .load (chkpt_path )["state_dict" ]
169
+ ) # loading only weights
169
170
170
171
def forward (self , x ) -> torch .Tensor :
171
172
return self .model (x )
You can’t perform that action at this time.
0 commit comments