{"comment":{"url":"https://api.github.com/repos/alexgkendall/simplelearn/comments/11499819","html_url":"https://github.com/alexgkendall/simplelearn/commit/c45df2eda7a394a67d5d49518533104e6b407b0c#commitcomment-11499819","id":11499819,"user":{"login":"SuperElectric","id":5941426,"avatar_url":"https://avatars.githubusercontent.com/u/5941426?v=3","gravatar_id":"","url":"https://api.github.com/users/SuperElectric","html_url":"https://github.com/SuperElectric","followers_url":"https://api.github.com/users/SuperElectric/followers","following_url":"https://api.github.com/users/SuperElectric/following{/other_user}","gists_url":"https://api.github.com/users/SuperElectric/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperElectric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperElectric/subscriptions","organizations_url":"https://api.github.com/users/SuperElectric/orgs","repos_url":"https://api.github.com/users/SuperElectric/repos","events_url":"https://api.github.com/users/SuperElectric/events{/privacy}","received_events_url":"https://api.github.com/users/SuperElectric/received_events","type":"User","site_admin":false},"position":107,"line":1752,"path":"simplelearn/nodes.py","commit_id":"c45df2eda7a394a67d5d49518533104e6b407b0c","created_at":"2015-06-03T14:07:07Z","updated_at":"2015-06-03T14:07:07Z","body":"The output format is set to be batch of scalars here, but it should be a 4-D feature map, with the same axis order as Conv2d, ('b', 'c', '0', '1'). It should also have the same # of rows and columns (axes '0' and '1'). This takes some code to set up:\r\n\r\n    def get_channel_axis(axis_map):\r\n        if axis_map is None:\r\n            return 'c'\r\n        else:\r\n            for key, value in axis_map.iteritems():\r\n                if value == 'c':\r\n                    return key\r\n\r\n    channel_axis = get_channel_axis(axis_map)\r\n    num_channels = sum([n.output_format.shape[n.output_format.axes.index(channel_axis)]\r\n                        for n in [self.conv1x1, self.conv3x3, self.conv5x5, self.pool2d_node])\r\n\r\n    c33_format = self.conv3x3.output_format\r\n    assert_equal(c33_format.axes, ('b', 'c', '0', '1'))\r\n    result_format = DenseFormat(axes=('b', 'c', '0', '1'),\r\n                                shape=(-1, num_channels, c33_format.shape[2], c33_format.shape[3]),\r\n                                dtype=c33_format.dtype) "}}