Skip to content

Commit

Permalink
Add __repr__ method to TrtConversionParams to have class properties i…
Browse files Browse the repository at this point in the history
…n API pbtxt
  • Loading branch information
Pooya Davoodi committed Jan 17, 2020
1 parent 69a6150 commit fbe5b54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tensorflow/python/compiler/tensorrt/trt_convert.py
Expand Up @@ -190,6 +190,9 @@ def _replace(self,
setattr(trt_conversion_params, k, v)
return trt_conversion_params

def __repr__(self):
return "TrtConversionParams" + str(vars(self))


DEFAULT_TRT_CONVERSION_PARAMS = TrtConversionParams()

Expand Down
Expand Up @@ -4,7 +4,7 @@ tf_class {
is_instance: "<type \'object\'>"
member_method {
name: "__init__"
argspec: "args=[\'self\', \'input_saved_model_dir\', \'input_saved_model_tags\', \'input_saved_model_signature_key\', \'conversion_params\'], varargs=None, keywords=None, defaults=[\'None\', \'None\', \'None\', \'<tensorflow.python.compiler.tensorrt.trt_convert.TrtConversionParams object instance>\'], "
argspec: "args=[\'self\', \'input_saved_model_dir\', \'input_saved_model_tags\', \'input_saved_model_signature_key\', \'conversion_params\'], varargs=None, keywords=None, defaults=[\'None\', \'None\', \'None\', \"TrtConversionParams{\'rewriter_config_template\': None, \'max_workspace_size_bytes\': 1073741824, \'precision_mode\': \'FP32\', \'minimum_segment_size\': 3, \'is_dynamic_op\': True, \'maximum_cached_engines\': 1, \'use_calibration\': True, \'max_batch_size\': 1}\"], "
}
member_method {
name: "build"
Expand Down

0 comments on commit fbe5b54

Please sign in to comment.