Ai
1 Star 1 Fork 0

YHO_O/objectdetection_script

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
tricks_13.py 722 Bytes
一键复制 编辑 原始数据 按行查看 历史
z1069614715 提交于 2024-07-19 21:53 +08:00 . update-yolov8-project-and-add-tricks-13
if type(x) in {list, tuple}:
if idx == (len(self.model) - 1):
if type(x[1]) is dict:
print(f'layer id:{idx:>2} {m.type:>50} output shape:{", ".join([str(x_.size()) for x_ in x[1]["one2one"]])}')
else:
print(f'layer id:{idx:>2} {m.type:>50} output shape:{", ".join([str(x_.size()) for x_ in x[1]])}')
else:
print(f'layer id:{idx:>2} {m.type:>50} output shape:{", ".join([str(x_.size()) for x_ in x if x_ is not None])}')
elif type(x) is dict:
print(f'layer id:{idx:>2} {m.type:>50} output shape:{", ".join([str(x_.size()) for x_ in x["one2one"]])}')
else:
if not hasattr(m, 'backbone'):
print(f'layer id:{idx:>2} {m.type:>50} output shape:{x.size()}')
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ye-guozhen/objectdetection_script.git
git@gitee.com:ye-guozhen/objectdetection_script.git
ye-guozhen
objectdetection_script
objectdetection_script
master

搜索帮助