def _make_numpy_array(tensor_value):
     """
     Convert the tensor value into a numpy array.
     Here it's already numpy array
     """
     if is_tf_version_2x() and tf.executing_eagerly():
         if (
             isinstance(tensor_value, tf.Variable) or isinstance(tensor_value, tf.Tensor)
         ) and hasattr(tensor_value, "numpy"):
             # TF 2.X eager mode
             return tensor_value.numpy()
     return make_numpy_array(tensor_value)
 def _make_numpy_array(tensor_value):
     """
     Convert the tensor value into a numpy array.
     Here it's already numpy array
     """
     return make_numpy_array(tensor_value)
Exemple #3
0
 def _make_numpy_array(tensor_value):
     return make_numpy_array(tensor_value)