File size: 255 Bytes
e9fe176
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'CrossConvolve'

t = nn.CrossConvolve(1,3)

a = torch.rand(2,1,3,3)
a[1][1] = torch.eye(3)
a[2][1] = torch.eye(3)
b = torch.eye(3)
c = t:forward({a,b})

d = torch.rand(2,1,3,3)
d[1][1] = torch.eye(3)
d[2][1] = torch.eye(3)
e = t:backward({a,b},d)