class_docstr: Group of tests for link_regression() function
docstr: Test the binary operators: 'mul'/'Hadamard', 'l1', 'l2', 'avg'
docstr_tok: ["Test","the","binary","operators",":","'mul'\/'Hadamard","'",",","'l1","'",",","'l2","'",",","'avg","'"]
code: def test_mul_l1_l2_avg(self):
      """Test the binary operators: 'mul'/'Hadamard', 'l1', 'l2', 'avg'"""
  
      x_src, x_dst = make_orthonormal_vectors(self.d)
      x_src = x_src.reshape(1, 1, self.d)
      x_dst = x_dst.reshape(1, 1, self.d)
  
      inp_src = keras.Input(shape=(1, self.d))
      inp_dst = keras.Input(shape=(1, self.d))
  
      for op in ["mul", "l1", "l2", "avg", "concat"]:
          out = link_regression(
              output_dim=self.d_out, edge_embedding_method=op
          )([inp_src, inp_dst])
          li = keras.Model(inputs=[inp_src, inp_dst], outputs=out)
  
          res = li.predict(x=[x_src, x_dst])
          print(
              "link regression with '{}' operator: {}".format(
                  op, res.flatten()
              )
          )
  
          assert res.shape == (1, self.d_out)
          assert isinstance(res.flatten()[0], np.float32)
  
imports: from stellargraph.layer.link_inference import *
  import tensorflow
  from tensorflow import keras
  import numpy
  import pytest
label_desc: Use image node_id 2 for calling the Test_Link_Regression obj's underlying member method code with example usage: obj.test_mul_l1_l2_avg() without return types