Conversation
|
I tried pasting in the example network from |
|
Just checking... did you paste the + sign from the diff by any chance? |
|
Hmm, my model has a bunch of +local net = nn.Sequential()
+net:add(nn.MulConstant(0.004))
+net:add(nn.View(-1):setNumInputDims(3)) -- 1*10*10 -> 100
+net:add(nn.Linear(100,2))
+return function(params)
+ return {
+ model = net,
+ loss = nn.MSECriterion(),
+ }
+endThat's weird. |
|
Oh I see what you mean. Haha, whoops! |
|
Yep, that's all it was. My bad. New problem:
|
|
Oh thanks! I didn't know DIGITS supported unsupervised learning. What kind of networks have you been using? Perhaps I can try an autoencoder... |
|
I don't actually have an example - I'm not sure why I had that dataset lying around.
We still need some kind of a standard network for "generic" networks. Is there a standard autoencoder network out there that would do something interesting for arbitrary input data? |
|
Apparently BVLC/caffe#330 added one to Caffe for MNIST-like datasets. The model is derived from an article Hinton published (the Caffe implementation seems much simpler as pre-training with RBMs appears to be entirely skipped). |
|
Good spot! I tried it and it seems to run, I guess. Apparently cross-entropy loss can be [very] negative? I had to hack the graph to show loss values less than 0. The activations seem to have some concept of spatial relationships, even though the data is flattened. Not sure what's going on there, but it's interesting! |
|
copy @j-wilson in case he's interested to review. In theory this should allow DIGITS to use Torch to train any feed-forward network but as @lukeyeager pointed out this isn't working yet for unsupervised learning. I am working on this now. |
|
@lukeyeager I was able to train a simple auto-encoder using Torch. The network compresses MNIST-like images into 100 neurons and then tries to reconstruct the original image. The input may look like: |
|
That looks promising! I'd love to see this added as a "standard network" for generic inference if we can set the architecture to be somewhat independent of the image size (like AlexNet for Caffe). |
9d50e9f to
7f3d5c0
Compare
|
@lukeyeager do you think the autoencoder standard network needs to be added to merge this PR? |
No. Let's do that later. It looks like you updated this to make labels optional - let me review that real quick ... |
|
Argh. I still can't get the example to work. Sorry for all the screenshots, but I want to point out how many errors don't produce a helpful error which DIGITS can display. I tried running the example on 28x28 grayscale images. Turns out that error means I forgot to include the So I changed I get that error even if I switch to 10x10 grayscale images and use |
|
It would be helpful if we put an actual helptip for the "custom torch network" pane. Right now, the caffe helptip is still there, mocking me. |
7f3d5c0 to
ca1e694
Compare
ca1e694 to
f63e050
Compare
|
Admittedly, these error messages are somewhat cryptic. I expect the occasional Torch practitioner to find them mostly straightforward though. You figured out the reason for the first two errors. The third error is due to the fact that you're using an MSE loss which requires the network output and the label to have the same dimension. If you're using the example from |
Oh right, that was dumb - that network is expecting labelled data. D'oh! I've got it working now.
local net = nn.Sequential()
net:add(nn.MulConstant(0.004))
net:add(nn.View(-1):setNumInputDims(3))
net:add(nn.Linear(100,2))
return function(params)
return {
model = net,
loss = nn.MSECriterion(),
}
end |
Yeah, let's keep extending the timeouts. Sometimes Travis just slows down, and we shouldn't let that kill our build. Feel free to put that commit in another PR and merge immediately. |
|
Ok, I think this is ready to merge unless you have any other concerns. I still don't like the error messages, but our Caffe errors aren't usually much more legible. We can try to address that in later commits. |
NVM, I did it in #357 already. @jmancewicz, hopefully that will help with some of your testing troubles in other PRs. |
|
I think/hope it's good enough for merging. |
|
Merged. I forgot to ask you to remove your "Increase timeouts" commit before merging. Oh well. |








No description provided.