from keras.layers import Lambda
def ksum(x,dim = -1):
return K.sum(x,axis= dim)
attention_mul = Lambda(ksum,arguments={'dim':1})(x)
keras 自定义Layer
最新推荐文章于 2021-02-15 20:21:10 发布
from keras.layers import Lambda
def ksum(x,dim = -1):
return K.sum(x,axis= dim)
attention_mul = Lambda(ksum,arguments={'dim':1})(x)