Python tensorflow.python.util.compat.real_types() Examples
The following are 11
code examples of tensorflow.python.util.compat.real_types().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
tensorflow.python.util.compat
, or try the search function
.
Example #1
Source File: op_def_library.py From lambda-packs with MIT License | 5 votes |
def _MakeFloat(v, arg_name): if not isinstance(v, compat.real_types): raise TypeError("Expected float for argument '%s' not %s." % (arg_name, repr(v))) return float(v)
Example #2
Source File: tensor_util.py From lambda-packs with MIT License | 5 votes |
def _FilterFloat(v): if isinstance(v, (list, tuple)): return _FirstNotNone([_FilterFloat(x) for x in v]) return None if isinstance(v, compat.real_types) else _NotNone(v)
Example #3
Source File: op_def_library.py From auto-alt-text-lambda-api with MIT License | 5 votes |
def _MakeFloat(v, arg_name): if not isinstance(v, compat.real_types): raise TypeError("Expected float for argument '%s' not %s." % (arg_name, repr(v))) return float(v)
Example #4
Source File: tensor_util.py From auto-alt-text-lambda-api with MIT License | 5 votes |
def _FilterFloat(v): if isinstance(v, (list, tuple)): return _FirstNotNone([_FilterFloat(x) for x in v]) return None if isinstance(v, compat.real_types) else _NotNone(v)
Example #5
Source File: op_def_library.py From deep_image_model with Apache License 2.0 | 5 votes |
def _MakeFloat(v, arg_name): if not isinstance(v, compat.real_types): raise TypeError("Expected float for argument '%s' not %s." % (arg_name, repr(v))) return float(v)
Example #6
Source File: tensor_util.py From deep_image_model with Apache License 2.0 | 5 votes |
def _FilterFloat(v): if isinstance(v, (list, tuple)): return _FirstNotNone([_FilterFloat(x) for x in v]) return None if isinstance(v, compat.real_types) else _NotNone(v)
Example #7
Source File: execute.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def make_float(v, arg_name): if not isinstance(v, compat.real_types): raise TypeError("Expected float for argument '%s' not %s." % (arg_name, repr(v))) return float(v)
Example #8
Source File: op_def_library.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def _MakeFloat(v, arg_name): if not isinstance(v, compat.real_types): raise TypeError("Expected float for argument '%s' not %s." % (arg_name, repr(v))) return float(v)
Example #9
Source File: tensor_util.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def _FilterFloat(v): if isinstance(v, (list, tuple)): return _FirstNotNone([_FilterFloat(x) for x in v]) return None if isinstance(v, compat.real_types) else _NotNone(v)
Example #10
Source File: op_def_library.py From keras-lambda with MIT License | 5 votes |
def _MakeFloat(v, arg_name): if not isinstance(v, compat.real_types): raise TypeError("Expected float for argument '%s' not %s." % (arg_name, repr(v))) return float(v)
Example #11
Source File: tensor_util.py From keras-lambda with MIT License | 5 votes |
def _FilterFloat(v): if isinstance(v, (list, tuple)): return _FirstNotNone([_FilterFloat(x) for x in v]) return None if isinstance(v, compat.real_types) else _NotNone(v)