e9d5373461b0a037716722a461cb12416aa5d1bc,test.py,,extract_feature,#Any#Any#,132

Before Change


            outputs = model(input_img) 
            f = outputs.data.cpu()
            length = f.size()
            f = f.view(2048,int(length[1]/2048))
            f = f.sum(dim=1)
            f = f.view(1, 2048)
            ff = ff+f
        // norm feature
        fnorm = torch.norm(ff, p=2, dim=1, keepdim=True)

After Change


    for data in dataloaders:
        img, label = data
        labels = torch.cat((labels,label),0)
        n, c, h, w = img.size()
        count += n
        print(count)
        ff = torch.FloatTensor(n,2048).zero_()
        for i in range(2):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: layumi/Person_reID_baseline_pytorch
Commit Name: e9d5373461b0a037716722a461cb12416aa5d1bc
Time: 2018-01-01
Author: zzheng@joo-ml1-dev.j.cinglevue.com
File Name: test.py
Class Name:
Method Name: extract_feature


Project Name: osmr/imgclsmob
Commit Name: f668123151812480874a573cddd71c25a20c14a4
Time: 2019-03-05
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/others/oth_irevnet2.py
Class Name: psi
Method Name: inverse


Project Name: osmr/imgclsmob
Commit Name: f668123151812480874a573cddd71c25a20c14a4
Time: 2019-03-05
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/others/oth_irevnet2.py
Class Name: psi
Method Name: forward