zhiqic / damo-streamnet Goto Github PK
View Code? Open in Web Editor NEW[IJCAI 2023] DAMO-StreamNet: Optimizing Streaming Perception in Autonomous Driving
[IJCAI 2023] DAMO-StreamNet: Optimizing Streaming Perception in Autonomous Driving
请问streamnet_l_1200x1920.py中使用longshort_trainer,但是其他exp使用longshort_dil_trainer,是什么区别呢?
hi您好,我在运行run_train.sh不用预训练模型时遇到了下面的问题,请问可以如何解决?
RuntimeError: expected scalar type Half but found Float
经debug发现, self.conv1 的模型weight参数为float32,所以输入fp16会不匹配。
于是在 https://github.com/zhiqic/DAMO-StreamNet/blob/adf65eda4308f570dd4d3613c1bcb9f3a4afa7f8/exps/train_utils/longshort_trainer.py#L142 下一行加了修改模型为半精度即 model = model.half()
但是self.scaler.step(self.optimizer)这句报错ValueError: Attempting to unscale FP16 gradients.
还有在最开始使用预训练模型时也有报错:
File "/home/qtt/Test/DAMO-StreamNet/exps/train_utils/longshort_trainer.py", line 325, in resume_train
ckpt = torch.load(ckpt_file, map_location=self.device)["model"]
│ │ │ │ └ 'cuda:0'
│ │ │ └ <exps.train_utils.longshort_trainer.Trainer object at 0x7f2e84e47150>
│ │ └ '/home/qtt/Test/DAMO-StreamNet/models/coco_pretrained_models/yolox_l_drfpn.pth'
│ └ <function load at 0x7f2e86976200>
└ <module 'torch' from '/home/qtt/Software/anaconda3/envs/torch171_py37_cu110/lib/python3.7/site-packages/torch/init.py'>File "/home/qtt/Software/anaconda3/envs/torch171_py37_cu110/lib/python3.7/site-packages/torch/serialization.py", line 594, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
│ │ │ │ └ {'encoding': 'utf-8'}
│ │ │ └ <module 'pickle' from '/home/qtt/Software/anaconda3/envs/torch171_py37_cu110/lib/python3.7/pickle.py'>
│ │ └ 'cuda:0'
│ └ <torch._C.PyTorchFileReader object at 0x7f2e84b658b0>
└ <function _load at 0x7f2e86976560>
File "/home/qtt/Software/anaconda3/envs/torch171_py37_cu110/lib/python3.7/site-packages/torch/serialization.py", line 853, in _load
result = unpickler.load()
│ └ <method 'load' of '_pickle.Unpickler' objects>
└ <_pickle.Unpickler object at 0x7f2ddeee84d0>
File "/home/qtt/Software/anaconda3/envs/torch171_py37_cu110/lib/python3.7/site-packages/torch/serialization.py", line 845, in persistent_load
load_tensor(data_type, size, key, _maybe_decode_ascii(location))
│ │ │ │ │ └ 'cuda:0'
│ │ │ │ └ <function _maybe_decode_ascii at 0x7f2e86976440>
│ │ │ └ '94471090091744'
│ │ └ 256
│ └ <class 'torch.FloatStorage'>
└ <function _load..load_tensor at 0x7f2dd8b05cb0>
File "/home/qtt/Software/anaconda3/envs/torch171_py37_cu110/lib/python3.7/site-packages/torch/serialization.py", line 833, in load_tensor
storage = zip_file.get_storage_from_record(name, size, dtype).storage()
│ │ │ │ └ torch.float32
│ │ │ └ 256
│ │ └ 'data/94471090091744'
│ └ <instancemethod get_storage_from_record at 0x7f2e874cb6d0>
└ <torch._C.PyTorchFileReader object at 0x7f2e84b658b0>RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading file data/94471090091744: invalid header or archive is corrupted
环境设置与stream-yolo完全一致,且stream-yolo可以正常运行。
请问下环境设置是否有修改?谢谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.