According to paper I need elementwise multiplication of output maps between two conv layers. In numpy something like this:
batch_size = 3
xi = np.ones((batch_size, 10, 10, 24))
yi = np.ones((batch_size, 10, 10, 24))

results = []
for i in range(24):
  for k in range(24):
     results.append(xi[:,:,:,i]*yi[:,:,:,k])

In tensorflow 2 I can run simple example like this, but it fails during training:
a = np.zeros((3, 10, 10, 24))
b = np.zeros((3, 10, 10, 24))
mask_preds = []
for i in range(24):
  for j in range(24):
    mask_pred = tf.multiply(a[:,:,:,i], b[:,:,:,j])
    mask_preds.append(mask_pred.numpy())

mask_preds = tf.constant(mask_preds)
mask_preds = tf.transpose(mask_preds, [1,2,3,0]) # (batch, 10, 10, 24*24)