You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I observed a strange behavior for SpatialConvolution modules with group > 1, padding >0 and cudnn7 (with the branch R7).
When using R7 branch, the output feature map of a single convolution with groups is like translated (but only vertically !!!?) compared to the output obtained with the master branch. It also looks like the translation amplitude is somehow related (equal ?) to the padding used.
Here is a code snippet to reproduce the bug. You must change torch folder location (first line) before running). Try changing the padding or remove the groups.
I know torch lua maintenance may not be a priority but I though it might be an issue coming from somewhere deeper than lua and may help for pytorch too.
torch_folder='<path to your torch folder>'
here=$(pwd)
# Initialisation. Define the comon input tensor and module for both version test
rm ./output-*.t7
th -e "
require 'cudnn'
torch.save('input.t7', torch.randn(1,32,200,200))
torch.save('layer.t7', cudnn.SpatialConvolution(32,32,3,3,1,1,2,2, 32))
"
# operations performed once for both version
run_test() # performing a simple forward pass and storing the result
{
th -e "
require 'cudnn'
print(cudnn.version)
input = torch.load('input.t7'):cuda()
layer = torch.load('layer.t7'):cuda()
torch.save(('output-%s.t7'):format(cudnn.version), layer:forward(input))
"
}
# run with cudnn-torch for cudnn 7
cd $torch_folder'/extra/cudnn'
git checkout R7
luarocks make cudnn-scm-1.rockspec
cd $here
run_test
# run with cudnn-torch for cudnn 5
cd $torch_folder'/extra/cudnn'
git checkout master
luarocks make cudnn-scm-1.rockspec
cd $here
run_test
# Observation of differences between the two outputs
qlua -e "
require 'image'
require 'cutorch'
o1 = torch.load('output-5110.t7')[1]
o2 = torch.load('output-7001.t7')[1]
diff = o1:ne(o2)
print('# non equal elements : '.. 100*diff:sum()/diff:nElement() ..'%' )
print(o1[{1,{101,110},{101,110}}])
print(o2[{1,{101,110},{101,110}}])
image.display(diff)
"
Hi all.
I observed a strange behavior for SpatialConvolution modules with group > 1, padding >0 and cudnn7 (with the branch R7).
When using R7 branch, the output feature map of a single convolution with groups is like translated (but only vertically !!!?) compared to the output obtained with the master branch. It also looks like the translation amplitude is somehow related (equal ?) to the padding used.
Here is a code snippet to reproduce the bug. You must change torch folder location (first line) before running). Try changing the padding or remove the groups.
I know torch lua maintenance may not be a priority but I though it might be an issue coming from somewhere deeper than lua and may help for pytorch too.
Ouput sample :
The text was updated successfully, but these errors were encountered: