def orth_loss_v2(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]
self.Python(layer, layer, top=outputs, bottom=[bottom], name=layername, phase='TRAIN')
self.Matmul()
outputs = [self.this.name]
self.EuclideanLoss(name=bottom_name+'_euclidean', bottom=outputs, loss_weight=1e-1, phase='TRAIN')
# restore bottom
self.cur = mainpath
评论列表
文章目录