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)
| 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 | """ |