File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ def test_xbm_multisupcon_val(self):
9090 self .test_xbm_multisupcon_val_gt [dtype ][b ],
9191 atol = 1e-2 if dtype == torch .float16 else 1e-4 ))
9292
93+
9394 def test_with_no_valid_pairs (self ):
9495 for dtype in TEST_DTYPES :
9596 embedding_angles = [0 ]
@@ -105,21 +106,6 @@ def test_with_no_valid_pairs(self):
105106 loss .backward ()
106107 self .assertEqual (loss , 0 )
107108
108- def test_ (self ):
109- for dtype in TEST_DTYPES :
110- embedding_angles = [0 ]
111- embeddings = torch .tensor (
112- [angle_to_coord (a ) for a in embedding_angles ],
113- requires_grad = True ,
114- dtype = dtype ,
115- ).to (
116- TEST_DEVICE
117- ) # 2D embeddings
118- labels = torch .LongTensor ([[0 ]])
119- loss = self .loss_func (embeddings , labels )
120- loss .backward ()
121- self .assertEqual (loss , 0 )
122-
123109
124110 def test_backward (self ):
125111 for dtype in TEST_DTYPES :
You can’t perform that action at this time.
0 commit comments