# [NVIDIA Jetson AGX Orin Developer 運行Transformer模型(下篇)](/otAjXaZnQOaUDcE80UKOLQ) ## :question: 目標 :::success 學習如何成功驅動AGX orin並在上面執行Transformer AI模型 ::: ## :feet: previous :::success [安裝並運行Transformer模型(Uniad)上篇](https://hackmd.io/QSyaTdhWQPmy7xRWJXPw6Q) ::: ## :feet: Step :::success **[UniAD]**(https://github.com/OpenDriveLab/UniAD/blob/main/docs/INSTALL.md)的Transformer模型的運行 ::: 1. 根據[UniAD Github](https://github.com/OpenDriveLab/UniAD/blob/main/docs/INSTALL.md) 上的安裝手冊下載權重檔  >注意: 可以跳過前面gcc mmdet相關的安裝,直接下載權重檔,因為前篇我們已安裝過 2. 相關設定和資料集準備可以到我的[Github](https://github.com/Alex-fishred/Uniad_Orin)下載 3. 打開vscode設定 launch.json,設定如下  4. 打vscode開始運行test.py >注意:因為我有設定好vscode的launch.json所以可以直接在test.py按下F5 >此外,test.py已經被我改過,所以可以到我的[github](https://github.com/Alex-fishred/Uniad_Orin)下載修正過的版本 1. 遭遇錯誤(一) No module named 'IPython' 解法:pip install IPython 2. 遭遇錯誤(二) 'DiceLoss is already registered in models'  解法:將`@LOSSES.register_module()` 替換成 `@LOSSES.register_module(force=True)`  3. 遭遇錯誤(三) expected str, bytes or os.PathLike object, not _io.BufferedReader  解法: 修改mmdetection3d/mmdet3d/datasets/裡的custom_3d.py的load_annotations的path 將 ``` self.data_infos = self.load_annotations(open(local_path, 'rb')) ``` 改為 ``` self.data_infos = self.load_annotations(self.ann_file) ```  4. 遭遇錯誤(四)Unexpected keyword arguments: `compute_on_step` 解法:經查驗為torchmetrics **版本**問題(太新版不支援compute_on_step) 所以將torchmetrics-**1.3.0**降成torchmetrics-**0.11.4**版本  5. 將結果可視化 1. 開啟vscode設定 launch.json,設定如下  2. 執行run.py,該檔案位置在/media/ai/alexSSD/uniad/tools/analysis_tools/visualize/run.py 6. 大功告成  7. tool 版本紀錄         ## :feet: NEXT :::success 下一章將介紹如何加速模型推理速度 [在NVIDIA Jetson AGX Orin 上透過tensorrt運行Transformer模型](https://hackmd.io/@ht_ypbWySduBg0IliGLExw/rkkdoXGja) ::: 參考: https://blog.csdn.net/XCCCCZ/article/details/134313976 https://blog.csdn.net/condom10010/article/details/128139401
×
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