mstn icon indicating copy to clipboard operation
mstn copied to clipboard

is the Softmax function right?

Open lynnhhh opened this issue 4 years ago • 4 comments

Thanks for your nice work. I load the pre-train model and get the 78.6% acc on A->W. But I'm a little confused about the Softmax function in your code. As the input is N*C, why the Softmax function is applied to the 0-dimension? self.softmax = nn.Softmax(dim=0), I try to apply it to the 1-dimension and also get the 78.6% acc on A->W, but the model converges earlier.

lynnhhh avatar Mar 08 '20 09:03 lynnhhh

I have the same question, Why is dim=0 not the dim =1? a better performance?

datar001 avatar Nov 22 '20 09:11 datar001

Thanks for your nice work. I load the pre-train model and get the 78.6% acc on A->W. But I'm a little confused about the Softmax function in your code. As the input is N*C, why the Softmax function is applied to the 0-dimension? self.softmax = nn.Softmax(dim=0), I try to apply it to the 1-dimension and also get the 78.6% acc on A->W, but the model converges earlier.

Hi, I don't know why I didn't reproduce the result of 78.6%. this is my result: validation: 183.0, 0.23018867924528302

jingzhengli avatar May 09 '21 03:05 jingzhengli

Thanks for your nice work. I load the pre-train model and get the 78.6% acc on A->W. But I'm a little confused about the Softmax function in your code. As the input is N*C, why the Softmax function is applied to the 0-dimension? self.softmax = nn.Softmax(dim=0), I try to apply it to the 1-dimension and also get the 78.6% acc on A->W, but the model converges earlier.

I didn't reproduce the result Even without the domain adaptation module. I didn't change the code except for the part about load the pre-trained AlexNet model. I download the pre-trained model from here: https://github.com/jiecaoyu/XNOR-Net-PyTorch.

jingzhengli avatar May 09 '21 03:05 jingzhengli

Thanks for your nice work. I load the pre-train model and get the 78.6% acc on A->W. But I'm a little confused about the Softmax function in your code. As the input is N*C, why the Softmax function is applied to the 0-dimension? self.softmax = nn.Softmax(dim=0), I try to apply it to the 1-dimension and also get the 78.6% acc on A->W, but the model converges earlier.

I didn't reproduce the result Even without the domain adaptation module. I didn't change the code except for the part about load the pre-trained AlexNet model. I download the pre-trained model from here: https://github.com/jiecaoyu/XNOR-Net-PyTorch.

I switched to the pre-trained model, then the result is largely improved. Namely, the algorithm heavily relies on a Pre-trained model.

jingzhengli avatar May 09 '21 03:05 jingzhengli