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

Method output_spec

samples/python/efficientnet/infer.py:92–97  ·  view source on GitHub ↗

Get the specs for the output tensor of the network. Useful to prepare memory allocations. :return: Two items, the shape of the output tensor and its (numpy) datatype.

(self)

Source from the content-addressed store, hash-verified

90 return self.inputs[0]["shape"], self.inputs[0]["dtype"]
91
92 def output_spec(self):
93 """
94 Get the specs for the output tensor of the network. Useful to prepare memory allocations.
95 :return: Two items, the shape of the output tensor and its (numpy) datatype.
96 """
97 return self.outputs[0]["shape"], self.outputs[0]["dtype"]
98
99 def infer(self, batch, top=1):
100 """

Callers 1

inferMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected