# 藥品辨識 # 06253  # 06297  # 11027  # 13405  # 05121  # 16002  # 05273  # 11037  # 03102  # 11402  # 02043  # 16004  # 13473  # 19054  # 19055  # 05237  # pt 轉 onnx ``` def export_onnx(self,img_path): image = Image.open(img_path).convert('RGB') x = self.transform(image).unsqueeze(0) torch.onnx.export(self.model, x, self.model_name+".onnx") ``` # onnx 轉 tensorrt ``` /usr/src/tensorrt/bin/trtexec --onnx=rexnet_100.onnx --fp16 --workspace=2000 --saveEngine=rexnet_100.engine ``` # 嘗試半精浮點數 half # 測試推論 ``` /usr/src/tensorrt/bin/trtexec --loadEngine=rexnet_100.engine --inputIOFormats=fp32:CHW --output=BiasAdd_1203 --batch=1 /app/timm/test_100/Train/DoHands-onActivities/1000_125_1.jpg ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up