Skip to content

Commit 307cb54

Browse files
pre-commit-ci[bot]ytl0623
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci Signed-off-by: ytl0623 <david89062388@gmail.com>
1 parent 05142ed commit 307cb54

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tests/losses/test_unified_focal_loss.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"init_kwargs": {"use_softmax": False, "to_onehot_y": True},
5757
"forward_kwargs": {
5858
"input": torch.tensor([[[[1.0, 0.0], [0.0, 0.0]], [[0.0, 1.0], [0.0, 0.0]], [[0.0, 0.0], [1.0, 1.0]]]]),
59-
"target": torch.tensor([[[[0, 1], [2, 2]]]]), # Shape (1, 1, 2, 2)
59+
"target": torch.tensor([[[[0, 1], [2, 2]]]]),
6060
},
6161
},
6262
0.0,
@@ -66,15 +66,11 @@
6666
{
6767
"init_kwargs": {"use_softmax": True, "to_onehot_y": False},
6868
"forward_kwargs": {
69-
"input": torch.tensor(
70-
[[[[ -10.0, -10.0]], [[ 10.0, 10.0]], [[ -10.0, -10.0]]]] # B=1, C=3, H=1, W=2
71-
),
72-
"target": torch.tensor(
73-
[[[[ 1.0, 1.0]], [[ 0.0, 0.0]], [[ 0.0, 0.0]]]]
74-
),
69+
"input": torch.tensor([[[[-10.0, -10.0]], [[10.0, 10.0]], [[-10.0, -10.0]]]]),
70+
"target": torch.tensor([[[[1.0, 1.0]], [[0.0, 0.0]], [[0.0, 0.0]]]]),
7571
},
7672
},
77-
1.518984,
73+
1.518984,
7874
],
7975
]
8076

0 commit comments

Comments
 (0)