Adding features to label tensor class (#29)
* adding label.setter for runtime check on labels
This commit is contained in:
@@ -20,6 +20,8 @@ def test_labels():
|
||||
tensor = LabelTensor(data, labels)
|
||||
assert isinstance(tensor, torch.Tensor)
|
||||
assert tensor.labels == labels
|
||||
with pytest.raises(ValueError):
|
||||
tensor.labels = labels[:-1]
|
||||
|
||||
|
||||
def test_extract():
|
||||
|
||||
Reference in New Issue
Block a user