Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

How can i use MSE criterion? #71

Closed
neuralix opened this issue Dec 10, 2016 · 5 comments
Closed

How can i use MSE criterion? #71

neuralix opened this issue Dec 10, 2016 · 5 comments

Comments

@neuralix
Copy link

Running examples/mnist.lua simply, i can't change criterion to MSE Criterion.
Can you tell me the how-to?

@lvdmaaten
Copy link
Contributor

Sorry but this is for reporting issues in torchnet, not for general Torch questions.

https://github.com/torch/nn/blob/master/doc/criterion.md#msecriterion

@neuralix
Copy link
Author

neuralix commented Dec 13, 2016

I think the problem is still exist.

@Kaixhin
Copy link

Kaixhin commented Dec 13, 2016

Yes, you cannot just use any criterion. The MNIST example is for classification, whereas MSE should be used for regression. This can be found in the Torch nn documentation.

@neuralix
Copy link
Author

Thank you.

@neuralix
Copy link
Author

neuralix commented Dec 14, 2016

I suspect returning vector in getIterator(mode) {...} is not work.
(specifically, variable 'load' in ListDataset cannot contain vector as target.

target = torch.LongTensor(1,10) or target = torch.LongTensor(10, 1)
(instead of original line,
target = torch.LongTensor{dataset.label[idx] + 1} )
make error.

Will you have a plan to enhance it near some day?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants