Exporting fp16 onnx models.
This commit is contained in:
@ -24,7 +24,7 @@ class RTMDet(BaseModel):
|
||||
tensor, self.dx, self.dy, self.scale = letterbox(
|
||||
image, (tw, th), fill_value=114
|
||||
)
|
||||
tensor = tensor.astype(np.float32, copy=False)
|
||||
tensor = tensor.astype(self.input_type, copy=False)
|
||||
tensor = tensor[..., ::-1]
|
||||
tensor = np.expand_dims(tensor, axis=0).transpose((0, 3, 1, 2))
|
||||
return tensor
|
||||
|
||||
Reference in New Issue
Block a user