ouputs in semantic segmentation task
Im working on the Kaggle semantic segmentation task,

In the testing part of my code,

model = model.eval()
predictions =[]
for data in testdataloader:
    data = t.autograd.Variable(data, volatile=True).cuda()
    output = model.forward(data)
    _,preds = t.max(output, 1, keepdim = True)


when i do the preds part,the array is only filled with ,i was hoping it to be an array of maximum locations im not sure what is going wrong.
The output part works well,I have attached a screenshot for visualization of output

Any sugestions on what is going wrong would be really helpful.

thanks

Assuming your data is of the form MiniBatch x Dim what you are doing now is looking at which minibatch has the highest value. If you are testing it with a single sample (MB = 1) then you will always get 0 as your answer. Thus, you might want to try:

_,preds = t.max(output, 0, keepdim = False)

