fa2144e06f6157054428231d9f3f83cd5eebc181,scripts/classification/imagenet/demo_imagenet.py,,,#,14

Before Change


    transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])

img_transformed = nd.zeros((1, 3, 224, 224))
img_transformed[0,:,:,:] = transform_fn(img)
pred = net(img_transformed)

topK = 5
ind = nd.topk(pred, k=topK)[0].astype("int")

After Change


    transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])

pred = net(img.expand_dims(0))

topK = 5
ind = nd.topk(pred, k=topK)[0].astype("int")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: dmlc/gluon-cv
Commit Name: fa2144e06f6157054428231d9f3f83cd5eebc181
Time: 2018-04-22
Author: hetong007@gmail.com
File Name: scripts/classification/imagenet/demo_imagenet.py
Class Name:
Method Name:


Project Name: dmlc/gluon-cv
Commit Name: fa2144e06f6157054428231d9f3f83cd5eebc181
Time: 2018-04-22
Author: hetong007@gmail.com
File Name: scripts/classification/cifar/demo_cifar10.py
Class Name:
Method Name:


Project Name: dmlc/gluon-cv
Commit Name: fa2144e06f6157054428231d9f3f83cd5eebc181
Time: 2018-04-22
Author: hetong007@gmail.com
File Name: docs/tutorials/classification/demo_cifar10.py
Class Name:
Method Name: