SentenceSimilarity
SentenceSimilarity copied to clipboard
Inception Implementation Problem
class Inception1(nn.Module):
def __init__(self, input_dim, conv_dim=64):
super(Inception1, self).__init__()
self.cnn = nn.Sequential(
nn.Conv1d(input_dim, conv_dim, kernel_size=1),
nn.ReLU(),
nn.Conv1d(conv_dim, conv_dim, kernel_size=2),
nn.ReLU()
)
self.global_avg_pool = nn.AvgPool1d(input_dim)
self.global_max_pool = nn.MaxPool1d(input_dim)
def forward(self, x):
out = self.cnn(x)
avg_pool, max_pool = mean_max(x)
return torch.cat((avg_pool, max_pool), dim=1)
out in forward fuction seems not used? the same problem also exists in Inception2,Inception3
also found this problem. And some problem exists in the implement of Enhanced RCNN
Thanks, the forward function of the Inceptions has been fixed.