def buildFeatures(self, type='shared'):
assert self.checkTensor('q-channels')
assert self.checkTensor('a-channels')
srelu = lambda name: SReLU(name=name)
features = []
if type == 'shared':
q_features = self.linkFeature('q-channels', 'shared-convolution', activation='tanh')
a_features = self.linkFeature('a-channels', 'shared-convolution', activation='tanh')
else:
raise Error('Not Supported')
print('q-features', q_features._keras_shape, K.ndim(q_features))
print('a-features', a_features._keras_shape, K.ndim(a_features))
self.tensors['q-features'] = q_features
self.tensors['a-features'] = a_features
评论列表
文章目录