jotaf98 / schedule

Scheduler for MatConvNet experiments, including grid and random searches, with multi-GPU support.
7 stars 3 forks source link

issue while testing trained can_toy_data #1

Closed Tehseen-Akhtar closed 6 years ago

Tehseen-Akhtar commented 6 years ago

@jotaf98

hi brother I implemented cnn_toy_data and there is some logical type of error in this example that I am facing.. I trained your network and it converged very neatly.. when I tested it using the below code the answer in always [0,1,7.6763653e-09], means it always gives 2nd label in answer whether I use a triangle of circle of square.. Kindly tell what I am doing wrong.

%First I read a random image from your training set.. im = imread(fullfile(vlrootnn, 'data', 'toy-dataset/train/3/0130.png')) ; %Converted it from logical to single.. im = single(im) ; %forced the last layer from softmaxloss to softmax because it gives error otherwise ans.layers{end}.type = 'softmax'; %loaded the image data base which contains mean of all the images.. load('imdb.mat'); subtracted the mean from the test image.. im = im - mean ; %feeding the trained network and the test image to vl_simplenn for results res = vlsimplenn(ans, im) ; %gathering the scores.. scores = squeeze(gather(res(end).x)) ; [bestScore, best] = max(scores) ; ... Now the problem with the above code is that whether I select an image from label 1, 2 or 3 the answer is always [0,1,7.6763653e-09] means the second category always wins what am I doing wrong kindly elaborate thanks in advance..

Warm Regards

jotaf98 commented 6 years ago

Hi, you're posting this to the wrong repo -- the problem is unrelated to the schedule package.

With that said, you're reusing the variable "ans", which Matlab overwrites all the time with new results. There may be other bugs.

If you have further questions please post them to the MatConvNet repo, or forum: https://groups.google.com/d/forum/matconvnet