Exporting fp16 onnx models.
This commit is contained in:
@ -45,7 +45,7 @@ class SimCC(BaseModel):
|
||||
|
||||
def preprocess(self, image: np.ndarray):
|
||||
tensor, self.dx, self.dy, self.scale = image, 0, 0, 1
|
||||
tensor = tensor.astype(np.float32, copy=False)
|
||||
tensor = tensor.astype(self.input_type, copy=False)
|
||||
tensor = np.expand_dims(tensor, axis=0).transpose((0, 3, 1, 2))
|
||||
return tensor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user