def __call__(self, x, t=None):
self.clear()
h1 = F.leaky_relu(self.conv1(x), slope=0.1)
h1 = F.leaky_relu(self.conv2(h1), slope=0.1)
h1 = F.leaky_relu(self.conv3(h1), slope=0.1)
h2 = self.seranet_v1_crbm(x)
# Fusion
h12 = F.concat((h1, h2), axis=1)
lu = F.leaky_relu(self.convlu6(h12), slope=0.1)
lu = F.leaky_relu(self.convlu7(lu), slope=0.1)
lu = F.leaky_relu(self.convlu8(lu), slope=0.1)
ru = F.leaky_relu(self.convru6(h12), slope=0.1)
ru = F.leaky_relu(self.convru7(ru), slope=0.1)
ru = F.leaky_relu(self.convru8(ru), slope=0.1)
ld = F.leaky_relu(self.convld6(h12), slope=0.1)
ld = F.leaky_relu(self.convld7(ld), slope=0.1)
ld = F.leaky_relu(self.convld8(ld), slope=0.1)
rd = F.leaky_relu(self.convrd6(h12), slope=0.1)
rd = F.leaky_relu(self.convrd7(rd), slope=0.1)
rd = F.leaky_relu(self.convrd8(rd), slope=0.1)
# Splice
h = CF.splice(lu, ru, ld, rd)
h = F.leaky_relu(self.conv9(h), slope=0.1)
h = F.leaky_relu(self.conv10(h), slope=0.1)
h = F.leaky_relu(self.conv11(h), slope=0.1)
h = F.clipped_relu(self.conv12(h), z=1.0)
if self.train:
self.loss = F.mean_squared_error(h, t)
return self.loss
else:
return h
评论列表
文章目录