Beispiel #1
0
 def test_get_item(self):
     diag_lv = DiagLazyVariable(Variable(diag))
     diag_ev = diag_lv.evaluate()
     self.assertTrue(
         torch.equal(diag_lv[0:2].evaluate().data, diag_ev[0:2].data))
def test_evaluate():
    diag_lv = DiagLazyVariable(Variable(diag))
    assert torch.equal(diag_lv.evaluate().data, diag.diag())
Beispiel #3
0
 def test_evaluate(self):
     diag_lv = DiagLazyVariable(Variable(diag))
     self.assertTrue(torch.equal(diag_lv.evaluate().data, diag.diag()))
def test_get_item():
    diag_lv = DiagLazyVariable(Variable(diag))
    diag_ev = diag_lv.evaluate()
    assert torch.equal(diag_lv[0:2].evaluate().data, diag_ev[0:2].data)