2424 [
2525 {},
2626 {
27- "y_pred" : torch .tensor ([[[[20 .0 , - 20 .0 ], [- 20 .0 , 20 .0 ]]], [[[20 .0 , - 20 .0 ], [- 20 .0 , 20 .0 ]]]]),
27+ "y_pred" : torch .tensor ([[[[100 .0 , - 100 .0 ], [- 100 .0 , 100 .0 ]]], [[[100 .0 , - 100 .0 ], [- 100 .0 , 100 .0 ]]]]),
2828 "y_true" : torch .tensor ([[[[1.0 , 0 ], [0 , 1.0 ]]], [[[1.0 , 0 ], [0 , 1.0 ]]]]),
2929 },
3030 0.0 ,
3333 [
3434 {"use_softmax" : False , "to_onehot_y" : False },
3535 {
36- "y_pred" : torch .tensor ([[[[20 .0 , - 20 .0 ], [- 20 .0 , 20 .0 ]]], [[[20 .0 , - 20 .0 ], [- 20 .0 , 20 .0 ]]]]),
36+ "y_pred" : torch .tensor ([[[[100 .0 , - 100 .0 ], [- 100 .0 , 100 .0 ]]], [[[100 .0 , - 100 .0 ], [- 100 .0 , 100 .0 ]]]]),
3737 "y_true" : torch .tensor ([[[[1.0 , 0 ], [0 , 1.0 ]]], [[[1.0 , 0 ], [0 , 1.0 ]]]]),
3838 },
3939 0.0 ,
4242 [
4343 {"use_softmax" : True , "to_onehot_y" : True },
4444 {
45- "y_pred" : torch .tensor ([[[[- 20 .0 ]], [[- 20 .0 ]], [[20 .0 ]]]]).repeat (2 , 1 , 1 , 1 ),
45+ "y_pred" : torch .tensor ([[[[- 100 .0 ]], [[- 100 .0 ]], [[100 .0 ]]]]).repeat (2 , 1 , 1 , 1 ),
4646 "y_true" : torch .tensor ([[[[2 ]]]]).repeat (2 , 1 , 1 , 1 ),
4747 },
4848 0.0 ,
@@ -65,7 +65,7 @@ def test_ill_shape(self):
6565
6666 def test_with_cuda (self ):
6767 loss = AsymmetricUnifiedFocalLoss ()
68- i = torch .tensor ([[[[20 .0 , - 20 .0 ], [- 20 .0 , 20 .0 ]]], [[[20 .0 , - 20 .0 ], [- 20 .0 , 20 .0 ]]]])
68+ i = torch .tensor ([[[[100 .0 , - 100 .0 ], [- 100 .0 , 100 .0 ]]], [[[100 .0 , - 100 .0 ], [- 100 .0 , 100 .0 ]]]])
6969 j = torch .tensor ([[[[1.0 , 0 ], [0 , 1.0 ]]], [[[1.0 , 0 ], [0 , 1.0 ]]]])
7070 if torch .cuda .is_available ():
7171 i = i .cuda ()
0 commit comments