soumith / imagenet-multiGPU.torch

an imagenet example in torch.
BSD 2-Clause "Simplified" License
402 stars 158 forks source link

I used just 2 class training. But test outputs are 4 values. Why? #105

Open bemoregt opened 7 years ago

bemoregt commented 7 years ago

Hi, @Smerity @bobbens @pedropgusmao @soumith @ppwwyyxx

I used just nClasses=2 training(In opts.lua). But test outputs are 4 values. Why?

   `-> (2): nn.Sequential {
         [input -> (1) -> (2) -> (3) -> (4) -> (5) -> (6) -> (7) -> output]
         (1): cudnn.SpatialAveragePooling(5x5, 3,3)
         (2): cudnn.SpatialConvolution(576 -> 128, 1x1)
         (3): nn.View(2048)
         (4): nn.Linear(2048 -> 768)
         (5): cudnn.ReLU
         (6): nn.Linear(768 -> 2)
         (7): cudnn.LogSoftMax
       }
   ... -> output

} } -1.3409e+01 -1.4305e-06 -7.0193e-01 -6.8444e-01 [torch.CudaTensor of size 1x4]

Thanks in advance ~