def plain_func(self, name, num_output, up=False, **kwargs):
self.conv_bn_relu(name+'_conv0', num_output=num_output, stride=1+int(up), **kwargs)
self.conv_bn_relu(name+'_conv1', num_output=num_output, **kwargs)
# def orth_loss(self, bottom_name):
# # self.Python('orth_loss', 'orthLossLayer', loss_weight=1, bottom=[bottom_name], top=[name], name=name)
# # , bottom=[bottom+'_MVN']
# # save bottom
# mainpath = self.bottom
# bottom = bottom_name #'NormLayer',
# # self.MVN(bottom=[bottom])
# layer = "TransposeLayer"
# layername = bottom_name+'_' + layer
# outputs = [layername]#, bottom_name+'_zerolike']
# self.Python(layer, layer, top=outputs, bottom=[bottom], name=layername, phase='TRAIN')
# self.Matmul()
# # layer="diagLayer"
# # layername = bottom_name+'_' + layer
# # self.Python(layer, layer, top=[layername], name=layername, phase='TRAIN')
# outputs = [self.this.name]#, bottom_name+'_zerolike']
# self.EuclideanLoss(name=bottom_name+'_euclidean', bottom=outputs, loss_weight=1e-3, phase='TRAIN')
# # restore bottom
# self.cur = mainpath
评论列表
文章目录