{"action":"opened","issue":{"url":"https://api.github.com/repos/alexgkendall/caffe-segnet/issues/118","repository_url":"https://api.github.com/repos/alexgkendall/caffe-segnet","labels_url":"https://api.github.com/repos/alexgkendall/caffe-segnet/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/alexgkendall/caffe-segnet/issues/118/comments","events_url":"https://api.github.com/repos/alexgkendall/caffe-segnet/issues/118/events","html_url":"https://github.com/alexgkendall/caffe-segnet/issues/118","id":242271928,"number":118,"title":"the problem with compute_bn_statistics","user":{"login":"hrbspider","id":30104677,"avatar_url":"https://avatars1.githubusercontent.com/u/30104677?v=3","gravatar_id":"","url":"https://api.github.com/users/hrbspider","html_url":"https://github.com/hrbspider","followers_url":"https://api.github.com/users/hrbspider/followers","following_url":"https://api.github.com/users/hrbspider/following{/other_user}","gists_url":"https://api.github.com/users/hrbspider/gists{/gist_id}","starred_url":"https://api.github.com/users/hrbspider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hrbspider/subscriptions","organizations_url":"https://api.github.com/users/hrbspider/orgs","repos_url":"https://api.github.com/users/hrbspider/repos","events_url":"https://api.github.com/users/hrbspider/events{/privacy}","received_events_url":"https://api.github.com/users/hrbspider/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-12T06:22:59Z","updated_at":"2017-07-12T06:22:59Z","closed_at":null,"body":"Hi, Alex and guys:\r\n\r\nI don't understand why [compute the mean and var value](https://github.com/alexgkendall/SegNet-Tutorial/blob/master/Scripts/compute_bn_statistics.py) in the for iterations and what does net.forward() do when no input data feed in.\r\n`\r\nnet = caffe.Net(testable_net_path, train_weights_path, caffe.TEST)\r\n--\r\n  |  \r\n  | # init our blob stores with the first forward pass\r\n  | res = net.forward()\r\n  | bn_avg_mean = {bn_mean: np.squeeze(res[bn_mean]).copy() for bn_mean in bn_means}\r\n  | bn_avg_var = {bn_var: np.squeeze(res[bn_var]).copy() for bn_var in bn_vars}\r\n  |  \r\n  | # iterate over the rest of the training set\r\n  | for i in xrange(1, num_iterations):\r\n  | res = net.forward()\r\n  | for bn_mean in bn_means:\r\n  | bn_avg_mean[bn_mean] += np.squeeze(res[bn_mean])\r\n  | for bn_var in bn_vars:\r\n  | bn_avg_var[bn_var] += np.squeeze(res[bn_var])\r\n  | print 'progress: {}/{}'.format(i, num_iterations)\r\n\r\n`\r\nquestions:\r\n1.in every iteration ,there 's a `res = net.forward()`, and followed by computing _res[bn_mean]_ and _res[bn_var]._ what does net.forward() actually do when there's no data feed in?\r\n2.why _res[bn_mean]_ and _res[bn_var]_ computed after `res = net.forward()` and why in the for iteration?\r\n\r\nthanks very much!"}}
{"actor":{"display_login":"hrbspider"}}