Where Sequential modules between the equal signs are concatenated by Inception(3a). We see that nn.SpatialMaxPooling has an output size of (1 x 32 x 5 x 5). Going into the Torch documentation and viewing the raw output, the DepthConcat layer used to make the Inception module actually adds padding to nn.SpatialMaxPooling to make it's dimensions W x H = 12 x 12. Here is the sample of the output I saw, from a forward pass of random images:
#!/usr/bin/env th
require 'torch'
require 'nn'
require 'dpnn'
torch.setdefaulttensortype('torch.FloatTensor')
path = '/path/to/nn4.small2.v1.t7'
local net = torch.load(path):float()
net:evaluate()
local img = torch.randn(1, 1, 3, 96, 96)
net:forward(img[1])
function printOut (net)
for i = 1, #net.modules do
name = torch.type(net.modules[i])
print(name)
if name == "nn.Sequential" then
print(torch.type(net.modules[i].modules[1]))
end
print(net.modules[i].output:size())
if name == "nn.Inception" then
print('=============================================================================================')
--printOut (net.modules[i].modules[1])
print(net.modules[i].output)
print('=============================================================================================')
do return end
end
print('\n\n')
end
end
printOut(net)
Operating system: Ubuntu 16.04
Torch version: 7
The text was updated successfully, but these errors were encountered:
Context of the issue.
The OpenFace pre-trained model nn4.small2.v1.t7 on your website may be trained incorrectly, or be outputting results that were not intended.
Expected behavior.
Inception 3a (and other Inception layers) should be outputting a tensor with W = 12 and H = 12, as outlined in your paper.
Actual behavior.
Printing out the output tensor size of Inception(3a) after a forward pass of nn4.small2.v1.t7:
Where Sequential modules between the equal signs are concatenated by Inception(3a). We see that nn.SpatialMaxPooling has an output size of (1 x 32 x 5 x 5). Going into the Torch documentation and viewing the raw output, the DepthConcat layer used to make the Inception module actually adds padding to nn.SpatialMaxPooling to make it's dimensions W x H = 12 x 12. Here is the sample of the output I saw, from a forward pass of random images:
Steps to reproduce.
Script used to print out results:
The text was updated successfully, but these errors were encountered: