I am trying to multiply each layer of a tensor with the first layer of the tensor.
x1 = bert_model_1([x1_in, x2_in])
x1_begin = Lambda(lambda x: x[:,0])(x1) #obtain the first layer of the bert tensor
x1_begin = Lambda(keras.layers.multiply(x11, x1_begin) for x11 in x1)([x1, x1_begin])
when i ran the code above, i keep getting the following errors,
<generator object build_corrector. . at 0x00000249DB234C48> is not a callable object.
the error seems to happen in the last line, how do i iterate each layer in the tensor?
question from:
https://stackoverflow.com/questions/65912273/how-do-multiply-each-layer-of-a-tensor-with-another-tensor 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…