MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / __call__

Method __call__

bench/python/bench_utils.py:74–92  ·  view source on GitHub ↗

Runs the operator on a given input. Also visualizes the output if visualization was set to True. :param input: The input tensor to run the operator on. :returns: True if the operator executed successfully, False otherwise.

(self, input)

Source from the content-addressed store, hash-verified

72 self.setup(self.input)
73
74 def __call__(self, input):
75 """
76 Runs the operator on a given input. Also visualizes the output if visualization was set to True.
77 :param input: The input tensor to run the operator on.
78 :returns: True if the operator executed successfully, False otherwise.
79 """
80 try:
81 self.op_output = self.run(input)
82
83 if self.should_visualize and self.output_dir:
84 self.visualize()
85
86 return True
87 except Exception as e:
88 logger.error(
89 "Unable to run the op %s due to error: %s"
90 % (self.__class__.__name__, str(e))
91 )
92 return False
93
94 @abstractmethod
95 def setup(self, input):

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
visualizeMethod · 0.95

Tested by

no test coverage detected