7634391b070859dc1c11b092fde754dbc7911d4a,test/test_losses.py,TestDepthSmoothnessLoss,test_smoke,#TestDepthSmoothnessLoss#Any#Any#,237

Before Change


        depth = torch.rand(data_shape).to(device)

        criterion = kornia.losses.InverseDepthSmoothnessLoss()
        loss = criterion(depth, image)

    // TODO: implement me
    def test_1(self, device):
        pass

After Change



class TestDiceLoss:
    def test_smoke(self, device, dtype):
        num_classes = 3
        logits = torch.rand(2, num_classes, 3, 2, device=device, dtype=dtype)
        labels = torch.rand(2, 3, 2) * num_classes
        labels = labels.to(device).long()

        criterion = kornia.losses.DiceLoss()
        assert criterion(logits, labels) is not None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: arraiy/torchgeometry
Commit Name: 7634391b070859dc1c11b092fde754dbc7911d4a
Time: 2021-01-12
Author: edgar.riba@gmail.com
File Name: test/test_losses.py
Class Name: TestDepthSmoothnessLoss
Method Name: test_smoke


Project Name: pytorch/examples
Commit Name: 77a6ec73c53c5cc62a2ae451694537144afa5644
Time: 2016-09-14
Author: alerer@fb.com
File Name: mnist/main.py
Class Name:
Method Name: test