def toStringOrTFTensor(value): if isinstance(value, tf.Tensor): return value else: try: return TypeConverters.toString(value) except TypeError: raise TypeError("Could not convert %s to tensorflow.Tensor or str" % type(value))
def toStringOrTFTensor(value): if isinstance(value, tf.Tensor): return value else: try: return TypeConverters.toString(value) except TypeError: raise TypeError( "Could not convert %s to tensorflow.Tensor or str" % type(value))
def convert(value): if value is None: raise TypeError("None is not allowed.") else: return TypeConverters.toString(value)
def convert(value): if value is None: return None else: return TypeConverters.toString(value)
def convert(value): package = getattr(_jvm().ai.h2o.sparkling.ml.params, "H2OAlgoParamsHelper$") return package.__getattr__("MODULE$").getValidatedEnumValue(enumClass, TypeConverters.toString(value))
def _tensor_name(tensor): if isinstance(tensor, tf.Tensor): return _tensor_name(tensor.name) return TypeConverters.toString(tensor)