File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 6
6
7
7
8
8
def test_from_pretrained_with_mismatched_keys ():
9
- orginal_model = smp .Unet (classes = 1 )
9
+ original_model = smp .Unet (classes = 1 )
10
10
11
11
with tempfile .TemporaryDirectory () as temp_dir :
12
- orginal_model .save_pretrained (temp_dir )
12
+ original_model .save_pretrained (temp_dir )
13
13
14
14
# we should catch warning here and check if there specific keys there
15
15
with pytest .warns (UserWarning ):
@@ -18,7 +18,7 @@ def test_from_pretrained_with_mismatched_keys():
18
18
assert restored_model .segmentation_head [0 ].out_channels == 2
19
19
20
20
# verify all the weight are the same expect mismatched ones
21
- original_state_dict = orginal_model .state_dict ()
21
+ original_state_dict = original_model .state_dict ()
22
22
restored_state_dict = restored_model .state_dict ()
23
23
24
24
expected_mismatched_keys = [
You can’t perform that action at this time.
0 commit comments