Type test_util
Namespace tensorflow.python.framework.test_util
Methods
- also_run_as_tf_function
- also_run_as_tf_function_dyn
- assert_equal_graph_def
- assert_equal_graph_def_dyn
- assert_meta_graph_protos_equal
- assert_meta_graph_protos_equal_dyn
- assert_no_garbage_created
- assert_no_garbage_created_dyn
- assert_no_new_pyobjects_executing_eagerly
- assert_no_new_pyobjects_executing_eagerly_dyn
- assert_no_new_tensors
- assert_no_new_tensors_dyn
- assert_ops_in_graph
- assert_ops_in_graph_dyn
- build_as_function_and_v1_graph
- build_as_function_and_v1_graph_dyn
- deprecated_graph_mode_only
- deprecated_graph_mode_only_dyn
- device
- device
- disable_control_flow_v2
- disable_control_flow_v2_dyn
- disable_xla
- disable_xla_dyn
- enable_c_shapes
- enable_c_shapes_dyn
- enable_control_flow_v2
- enable_control_flow_v2_dyn
- enable_output_all_intermediates
- enable_output_all_intermediates_dyn
- enable_tf_xla_constant_folding
- enable_tf_xla_constant_folding_dyn
- for_all_test_methods
- for_all_test_methods
- for_all_test_methods_dyn
- for_all_test_methods_dyn
- force_cpu
- force_cpu_dyn
- force_gpu
- force_gpu_dyn
- generate_combinations_with_testcase_name
- generate_combinations_with_testcase_name_dyn
- get_node_def_from_graph
- get_node_def_from_graph_dyn
- InstallStackTraceHandler
- InstallStackTraceHandler_dyn
- is_xla_enabled
- is_xla_enabled_dyn
- NCHW_VECT_CToNHWC
- NCHW_VECT_CToNHWC
- NCHW_VECT_CToNHWC_dyn
- NCHWToNHWC
- NCHWToNHWC
- NCHWToNHWC_dyn
- NHWCToNCHW
- NHWCToNCHW
- NHWCToNCHW
- NHWCToNCHW
- NHWCToNCHW
- NHWCToNCHW
- NHWCToNCHW_dyn
- NHWCToNCHW_VECT_C
- NHWCToNCHW_VECT_C
- NHWCToNCHW_VECT_C_dyn
- no_xla_auto_jit
- no_xla_auto_jit_dyn
- py_func_if_in_function
- py_func_if_in_function_dyn
- run_all_in_graph_and_eager_modes
- run_all_in_graph_and_eager_modes_dyn
- run_cuda_only
- run_cuda_only_dyn
- run_gpu_only
- run_gpu_only_dyn
- run_in_graph_and_eager_modes
- run_in_graph_and_eager_modes_dyn
- run_v1_only
- run_v1_only_dyn
- run_v2_only
- run_v2_only_dyn
- set_producer_version
- set_producer_version_dyn
- skip_if
- skip_if_dyn
- use_deterministic_cudnn
- use_deterministic_cudnn_dyn
- use_gpu
- use_gpu_dyn
- with_c_shapes
- with_c_shapes_dyn
- with_control_flow_v2
- with_control_flow_v2_dyn
- xla_allow_fallback
- xla_allow_fallback_dyn
Properties
- also_run_as_tf_function_fn
- assert_equal_graph_def_fn
- assert_meta_graph_protos_equal_fn
- assert_no_garbage_created_fn
- assert_no_new_pyobjects_executing_eagerly_fn
- assert_no_new_tensors_fn
- assert_ops_in_graph_fn
- build_as_function_and_v1_graph_fn
- CapturedWrites_fn
- deprecated_graph_mode_only_fn
- device_fn
- disable_control_flow_v2_fn
- disable_xla_fn
- EagerSessionWarner_fn
- enable_c_shapes_fn
- enable_control_flow_v2_fn
- enable_output_all_intermediates_fn
- enable_tf_xla_constant_folding_fn
- ErrorLoggingSession_fn
- FakeEagerSession_fn
- for_all_test_methods_fn
- force_cpu_fn
- force_gpu_fn
- generate_combinations_with_testcase_name_fn
- get_node_def_from_graph_fn
- GpuSupportsHalfMatMulAndConv_fn
- InstallStackTraceHandler_fn
- is_xla_enabled_fn
- IsBuiltWithROCm_fn
- IsGoogleCudaEnabled_fn
- IsMklEnabled_fn
- NCHW_VECT_CToNHWC_fn
- NCHWToNHWC_fn
- NHWCToNCHW_fn
- NHWCToNCHW_VECT_C_fn
- no_xla_auto_jit_fn
- py_func_if_in_function_fn
- run_all_in_graph_and_eager_modes_fn
- run_cuda_only_fn
- run_gpu_only_fn
- run_in_graph_and_eager_modes_fn
- run_v1_only_fn
- run_v2_only_fn
- set_producer_version_fn
- skip_if_fn
- TensorFlowTestCase_fn
- use_deterministic_cudnn_fn
- use_gpu_fn
- with_c_shapes_fn
- with_control_flow_v2_fn
- xla_allow_fallback_fn
Fields
Public static methods
object also_run_as_tf_function(PythonFunctionContainer f)
object also_run_as_tf_function_dyn(object f)
void assert_equal_graph_def(object actual, object expected, bool checkpoint_v2, bool hash_table_shared_name)
Asserts that two `GraphDef`s are (mostly) the same. Compares two `GraphDef` protos for equality, ignoring versions and ordering of
nodes, attrs, and control inputs. Node names are used to match up nodes
between the graphs, so the naming of nodes must be consistent.
Parameters
-
object
actual - The `GraphDef` we have.
-
object
expected - The `GraphDef` we expected.
-
bool
checkpoint_v2 - boolean determining whether to ignore randomized attribute values that appear in V2 checkpoints.
-
bool
hash_table_shared_name - boolean determining whether to ignore randomized shared_names that appear in HashTableV2 op defs.
object assert_equal_graph_def_dyn(object actual, object expected, ImplicitContainer<T> checkpoint_v2, ImplicitContainer<T> hash_table_shared_name)
Asserts that two `GraphDef`s are (mostly) the same. Compares two `GraphDef` protos for equality, ignoring versions and ordering of
nodes, attrs, and control inputs. Node names are used to match up nodes
between the graphs, so the naming of nodes must be consistent.
Parameters
-
object
actual - The `GraphDef` we have.
-
object
expected - The `GraphDef` we expected.
-
ImplicitContainer<T>
checkpoint_v2 - boolean determining whether to ignore randomized attribute values that appear in V2 checkpoints.
-
ImplicitContainer<T>
hash_table_shared_name - boolean determining whether to ignore randomized shared_names that appear in HashTableV2 op defs.
void assert_meta_graph_protos_equal(TestCase tester, object a, object b)
object assert_meta_graph_protos_equal_dyn(object tester, object a, object b)
object assert_no_garbage_created(PythonFunctionContainer f)
object assert_no_garbage_created_dyn(object f)
object assert_no_new_pyobjects_executing_eagerly(PythonFunctionContainer f)
object assert_no_new_pyobjects_executing_eagerly_dyn(object f)
object assert_no_new_tensors(PythonFunctionContainer f)
object assert_no_new_tensors_dyn(object f)
IDictionary<object, object> assert_ops_in_graph(IDictionary<string, string> expected_ops, Graph graph)
object assert_ops_in_graph_dyn(object expected_ops, object graph)
object build_as_function_and_v1_graph(PythonFunctionContainer func)
object build_as_function_and_v1_graph_dyn(object func)
object deprecated_graph_mode_only(PythonFunctionContainer func)
object deprecated_graph_mode_only_dyn(object func)
IContextManager<T> device(bool use_gpu)
IContextManager<T> device(string use_gpu)
object disable_control_flow_v2(string unused_msg)
object disable_control_flow_v2_dyn(object unused_msg)
object disable_xla(string description)
object disable_xla_dyn(object description)
object enable_c_shapes(object fn)
object enable_c_shapes_dyn(object fn)
object enable_control_flow_v2(PythonFunctionContainer fn)
object enable_control_flow_v2_dyn(object fn)
object enable_output_all_intermediates(object fn)
object enable_output_all_intermediates_dyn(object fn)
object enable_tf_xla_constant_folding(string description)
object enable_tf_xla_constant_folding_dyn(object description)
object for_all_test_methods(object decorator, Object[] args)
object for_all_test_methods(object decorator, IDictionary<string, object> kwargs, Object[] args)
object for_all_test_methods_dyn(object decorator, IDictionary<string, object> kwargs, Object[] args)
object for_all_test_methods_dyn(object decorator, Object[] args)
IContextManager<T> force_cpu()
object force_cpu_dyn()
IContextManager<T> force_gpu()
object force_gpu_dyn()
IList<PythonClassContainer> generate_combinations_with_testcase_name(IDictionary<string, object> kwargs)
object generate_combinations_with_testcase_name_dyn(IDictionary<string, object> kwargs)
object get_node_def_from_graph(string node_name, object graph_def)
object get_node_def_from_graph_dyn(object node_name, object graph_def)
void InstallStackTraceHandler()
object InstallStackTraceHandler_dyn()
bool is_xla_enabled()
object is_xla_enabled_dyn()
object NCHW_VECT_CToNHWC(IGraphNodeBase input_shape_or_tensor)
object NCHW_VECT_CToNHWC(IEnumerable<object> input_shape_or_tensor)
object NCHW_VECT_CToNHWC_dyn(object input_shape_or_tensor)
object NCHWToNHWC(IEnumerable<object> input_tensor)
object NCHWToNHWC(IGraphNodeBase input_tensor)
object NCHWToNHWC_dyn(object input_tensor)
object NHWCToNCHW(IndexedSlices input_tensor)
object NHWCToNCHW(IGraphNodeBase input_tensor)
object NHWCToNCHW(object input_tensor)
object NHWCToNCHW(string input_tensor)
object NHWCToNCHW(IEnumerable<int> input_tensor)
object NHWCToNCHW(ValueTuple<int, object> input_tensor)
object NHWCToNCHW_dyn(object input_tensor)
object NHWCToNCHW_VECT_C(IEnumerable<object> input_shape_or_tensor)
object NHWCToNCHW_VECT_C(IGraphNodeBase input_shape_or_tensor)
object NHWCToNCHW_VECT_C_dyn(object input_shape_or_tensor)
object no_xla_auto_jit(string description)
object no_xla_auto_jit_dyn(object description)
object py_func_if_in_function(PythonFunctionContainer f)
object py_func_if_in_function_dyn(object f)
object run_all_in_graph_and_eager_modes(PythonFunctionContainer cls)
object run_all_in_graph_and_eager_modes_dyn(object cls)
object run_cuda_only(object func)
object run_cuda_only_dyn(object func)
object run_gpu_only(PythonFunctionContainer func)
object run_gpu_only_dyn(object func)
object run_in_graph_and_eager_modes(PythonFunctionContainer func, object config, bool use_gpu, bool reset_test, bool assert_no_eager_garbage)
object run_in_graph_and_eager_modes_dyn(object func, object config, ImplicitContainer<T> use_gpu, ImplicitContainer<T> reset_test, ImplicitContainer<T> assert_no_eager_garbage)
object run_v1_only(string reason, object func)
object run_v1_only_dyn(object reason, object func)
object run_v2_only(PythonFunctionContainer func)
object run_v2_only_dyn(object func)
void set_producer_version(Graph graph, int producer_version)
object set_producer_version_dyn(object graph, object producer_version)
object skip_if(bool condition)
object skip_if_dyn(object condition)
object use_deterministic_cudnn(object func)
object use_deterministic_cudnn_dyn(object func)
IContextManager<T> use_gpu()
object use_gpu_dyn()
object with_c_shapes(object cls)
object with_c_shapes_dyn(object cls)
PythonClassContainer with_control_flow_v2(PythonClassContainer cls)
object with_control_flow_v2_dyn(object cls)
object xla_allow_fallback(string description)
object xla_allow_fallback_dyn(object description)
Public properties
PythonFunctionContainer also_run_as_tf_function_fn get;
PythonFunctionContainer assert_equal_graph_def_fn get;
PythonFunctionContainer assert_meta_graph_protos_equal_fn get;
PythonFunctionContainer assert_no_garbage_created_fn get;
PythonFunctionContainer assert_no_new_pyobjects_executing_eagerly_fn get;
PythonFunctionContainer assert_no_new_tensors_fn get;
PythonFunctionContainer assert_ops_in_graph_fn get;
PythonFunctionContainer build_as_function_and_v1_graph_fn get;
PythonFunctionContainer CapturedWrites_fn get;
PythonFunctionContainer deprecated_graph_mode_only_fn get;
PythonFunctionContainer device_fn get;
PythonFunctionContainer disable_control_flow_v2_fn get;
PythonFunctionContainer disable_xla_fn get;
PythonFunctionContainer EagerSessionWarner_fn get;
PythonFunctionContainer enable_c_shapes_fn get;
PythonFunctionContainer enable_control_flow_v2_fn get;
PythonFunctionContainer enable_output_all_intermediates_fn get;
PythonFunctionContainer enable_tf_xla_constant_folding_fn get;
PythonFunctionContainer ErrorLoggingSession_fn get;
PythonFunctionContainer FakeEagerSession_fn get;
PythonFunctionContainer for_all_test_methods_fn get;
PythonFunctionContainer force_cpu_fn get;
PythonFunctionContainer force_gpu_fn get;
PythonFunctionContainer generate_combinations_with_testcase_name_fn get;
PythonFunctionContainer get_node_def_from_graph_fn get;
PythonFunctionContainer GpuSupportsHalfMatMulAndConv_fn get;
PythonFunctionContainer InstallStackTraceHandler_fn get;
PythonFunctionContainer is_xla_enabled_fn get;
PythonFunctionContainer IsBuiltWithROCm_fn get;
PythonFunctionContainer IsGoogleCudaEnabled_fn get;
PythonFunctionContainer IsMklEnabled_fn get;
PythonFunctionContainer NCHW_VECT_CToNHWC_fn get;
PythonFunctionContainer NCHWToNHWC_fn get;
PythonFunctionContainer NHWCToNCHW_fn get;
PythonFunctionContainer NHWCToNCHW_VECT_C_fn get;
PythonFunctionContainer no_xla_auto_jit_fn get;
PythonFunctionContainer py_func_if_in_function_fn get;
PythonFunctionContainer run_all_in_graph_and_eager_modes_fn get;
PythonFunctionContainer run_cuda_only_fn get;
PythonFunctionContainer run_gpu_only_fn get;
PythonFunctionContainer run_in_graph_and_eager_modes_fn get;
PythonFunctionContainer run_v1_only_fn get;
PythonFunctionContainer run_v2_only_fn get;
PythonFunctionContainer set_producer_version_fn get;
PythonFunctionContainer skip_if_fn get;
PythonFunctionContainer TensorFlowTestCase_fn get;
PythonFunctionContainer use_deterministic_cudnn_fn get;
PythonFunctionContainer use_gpu_fn get;
PythonFunctionContainer with_c_shapes_fn get;
PythonFunctionContainer with_control_flow_v2_fn get;
PythonFunctionContainer xla_allow_fallback_fn get;
Public fields
object portpicker
return object
|