deep learning - in Torch, why is NIN and VGG19 network 1-top predicting always 670? -
i'm working torch7 on ubuntu, i'm trying apply deep neural network trained on imagenet2012 such nin or vgg19 single image.
this code.
require('image') require('nn') require('pretty-nn') net = torch.load('nin_test/nin_imagenet_w_model.t7') --net = torch.load('nin_test/vgg_19_w_model.t7') net:evaluate() images = image.load('nin_test/5ee446f7fdedd01db6c7ea3d43df72b46807911b.thumb.jpeg') mean= torch.tensor({0.485, 0.456, 0.406}) std =torch.tensor({0.229, 0.224, 0.225}) images3 = image.scale(images, 224, 224,'bilinear') i=1,3 images3[i] = images3[i]:add(-mean[i]):div(std[i]) end image.display{image = images3} output = net:forward(images3):view(-1) classes indices = torch.sort(output, true)
when test different images example image of human, cat, dog, bird , etc 1-top predict 670th class or label, means
t7> return indices[1] 670
what should do? what's problem?
Comments
Post a Comment