MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / output_spec

Method output_spec

samples/python/detectron2/infer.py:93–101  ·  view source on GitHub ↗

Get the specs for the output tensors of the network. Useful to prepare memory allocations. :return: A list with two items per element, the shape and (numpy) datatype of each output tensor.

(self)

Source from the content-addressed store, hash-verified

91 return self.inputs[0]['shape'], self.inputs[0]['dtype']
92
93 def output_spec(self):
94 """
95 Get the specs for the output tensors of the network. Useful to prepare memory allocations.
96 :return: A list with two items per element, the shape and (numpy) datatype of each output tensor.
97 """
98 specs = []
99 for o in self.outputs:
100 specs.append((o['shape'], o['dtype']))
101 return specs
102
103 def infer(self, batch, scales=None, nms_threshold=None):
104 """

Callers 1

inferMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected