You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
149 B

import torch
import torch.nn.functional as F
ker = torch.ones(1, 1, 5, 5) / 25
a = torch.ones(1, 1, 5, 5)
b = F.conv2d(a, ker, stride=1)
print(b)