{"action":"created","issue":{"url":"https://api.github.com/repos/pluskid/Mocha.jl/issues/80","labels_url":"https://api.github.com/repos/pluskid/Mocha.jl/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/pluskid/Mocha.jl/issues/80/comments","events_url":"https://api.github.com/repos/pluskid/Mocha.jl/issues/80/events","html_url":"https://github.com/pluskid/Mocha.jl/issues/80","id":97730080,"number":80,"title":"How make prediction?","user":{"login":"chapaev28","id":5725670,"avatar_url":"https://avatars.githubusercontent.com/u/5725670?v=3","gravatar_id":"","url":"https://api.github.com/users/chapaev28","html_url":"https://github.com/chapaev28","followers_url":"https://api.github.com/users/chapaev28/followers","following_url":"https://api.github.com/users/chapaev28/following{/other_user}","gists_url":"https://api.github.com/users/chapaev28/gists{/gist_id}","starred_url":"https://api.github.com/users/chapaev28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapaev28/subscriptions","organizations_url":"https://api.github.com/users/chapaev28/orgs","repos_url":"https://api.github.com/users/chapaev28/repos","events_url":"https://api.github.com/users/chapaev28/events{/privacy}","received_events_url":"https://api.github.com/users/chapaev28/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-28T15:09:36Z","updated_at":"2015-07-28T18:13:53Z","closed_at":null,"body":"Hi guys. I'm newbie in julia and mocha. I use examples and train my model. but in my task i have multiple output. for example in input image 32 x 32 on output image 12 x 12. training is ok. but i dont know how i may use my net. i load snapshot of trained model...but what i need to do next? in caffe i use method forward(forward_all). how i can froward my image through net? \r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/pluskid/Mocha.jl/issues/comments/125700642","html_url":"https://github.com/pluskid/Mocha.jl/issues/80#issuecomment-125700642","issue_url":"https://api.github.com/repos/pluskid/Mocha.jl/issues/80","id":125700642,"user":{"login":"pluskid","id":3542,"avatar_url":"https://avatars.githubusercontent.com/u/3542?v=3","gravatar_id":"","url":"https://api.github.com/users/pluskid","html_url":"https://github.com/pluskid","followers_url":"https://api.github.com/users/pluskid/followers","following_url":"https://api.github.com/users/pluskid/following{/other_user}","gists_url":"https://api.github.com/users/pluskid/gists{/gist_id}","starred_url":"https://api.github.com/users/pluskid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pluskid/subscriptions","organizations_url":"https://api.github.com/users/pluskid/orgs","repos_url":"https://api.github.com/users/pluskid/repos","events_url":"https://api.github.com/users/pluskid/events{/privacy}","received_events_url":"https://api.github.com/users/pluskid/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T18:13:53Z","updated_at":"2015-07-28T18:13:53Z","body":"@chapaev28 There is a similar function in Mocha. Basically, you can call `forward`, which runs one mini-batch only. Or you can call `forward_epoch` which runs one whole epoch (1 round over all the data). Typically, you do not want to run this on the original network used for training, because that is based on a data layer for the training set. So you can create another network, but with a new data layer (either hdf5-data or memory data, depending on your input), and do something like this:\r\n\r\n```julia\r\n  data_layer = HDF5DataLayer(source=\"data/test.txt\", batch_size=128, shuffle=false)\r\n  acc_layer = AccuracyLayer(bottoms=[:pred, :label])\r\n  net = Net(\"TIMIT-DNN-Test\", backend, [data_layer, common_layers..., pred_layer, acc_layer])\r\n  load_snapshot(net, basedir)\r\n  init(net)\r\n\r\n  forward_epoch(net)\r\n```\r\n\r\nNote here `common_layers` and `pred_layer` are the same layers you used to construct the training net. `load_snapshot` will load from a snapshot you saved during training. The code in [this tutorial](http://mochajl.readthedocs.org/en/latest/tutorial/ijulia-imagenet.html) contains a shallow wrapper (the `Classifier`) to do prediction based on images."}}