You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to train a swin-tiny detector, but I have got errors. If it is possible, could you please provide the corresponding environment for swin-tiny training. Thanks! 2022-11-24 15:54:27,351 - mmdet - INFO - load model from: pretrained/swin_tiny_patch4_window7_224.pth Traceback (most recent call last): File "tools/train.py", line 154, in <module> main() File "tools/train.py", line 127, in main cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg) File "/home/zhangyt/OrientedRepPoints/mmdet/models/builder.py", line 43, in build_detector return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "/home/zhangyt/OrientedRepPoints/mmdet/models/builder.py", line 15, in build return build_from_cfg(cfg, registry, default_args) File "/home/zhangyt/OrientedRepPoints/mmdet/utils/registry.py", line 79, in build_from_cfg return obj_cls(**args) File "/home/zhangyt/OrientedRepPoints/mmdet/models/detectors/orientedreppoints_detector.py", line 22, in __init__ pretrained) File "/home/zhangyt/OrientedRepPoints/mmdet/models/detectors/single_stage.py", line 31, in __init__ self.init_weights(pretrained=pretrained) File "/home/zhangyt/OrientedRepPoints/mmdet/models/detectors/single_stage.py", line 35, in init_weights self.backbone.init_weights(pretrained=pretrained) File "/home/zhangyt/OrientedRepPoints/mmdet/models/backbones/swin_transformer.py", line 595, in init_weights load_checkpoint(self, pretrained, strict=False, logger=logger) File "/home/zhangyt/OrientedRepPoints/mmcv_custom/checkpoint.py", line 306, in load_checkpoint checkpoint = _load_checkpoint(filename, map_location) File "/home/zhangyt/OrientedRepPoints/mmcv_custom/checkpoint.py", line 282, in _load_checkpoint checkpoint = torch.load(filename, map_location=map_location) File "/home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/serialization.py", line 527, in load with _open_zipfile_reader(f) as opened_zipfile: File "/home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/serialization.py", line 224, in __init__ super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /opt/conda/conda-bld/pytorch_1579022060824/work/caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. A$tempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at /opt/conda/conda-bld/pytorch_1579022060824/work/caffe2/serialize/inline_container.cc:132) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7efc0602d627 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libc10.so) frame #1: caffe2::serialize::PyTorchStreamReader::init() + 0x1f5b (0x7efc0a8fe9ab in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch.so) frame #2: caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::string const&) + 0x64 (0x7efc0a8ffbc4 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch.so) frame #3: <unknown function> + 0x6d2146 (0x7efc3855e146 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #4: <unknown function> + 0x28ba06 (0x7efc38117a06 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch_python.so) <omitting python frames> frame #6: python() [0x4d4352] frame #8: python() [0x4d0e59] frame #10: python() [0x4ba1a9] frame #14: python() [0x4d0c7e] frame #16: python() [0x4ba1a9] frame #20: python() [0x4ba06f] frame #24: python() [0x4ba06f] frame #28: python() [0x4ba06f] frame #32: python() [0x4ba06f] frame #36: python() [0x4ba06f] frame #40: python() [0x4ba06f] frame #44: python() [0x4d0c7e] frame #45: python() [0x4bbe28] frame #50: python() [0x4ba06f] frame #54: python() [0x4ba06f] frame #58: python() [0x4ba06f] frame #61: python() [0x4ba06f]
The text was updated successfully, but these errors were encountered:
@Leeinsn
Hello, have you resolved this problem?If your pytorch version is 1.4, you should use the pretrained model that is processed for pytorch1.4. The pretrained model--swin_tiny_patch4_window7_224 of Swin-Tiny for pytorch1.4.0 is here.
I tried to train a swin-tiny detector, but I have got errors. If it is possible, could you please provide the corresponding environment for swin-tiny training. Thanks!
2022-11-24 15:54:27,351 - mmdet - INFO - load model from: pretrained/swin_tiny_patch4_window7_224.pth Traceback (most recent call last): File "tools/train.py", line 154, in <module> main() File "tools/train.py", line 127, in main cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg) File "/home/zhangyt/OrientedRepPoints/mmdet/models/builder.py", line 43, in build_detector return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "/home/zhangyt/OrientedRepPoints/mmdet/models/builder.py", line 15, in build return build_from_cfg(cfg, registry, default_args) File "/home/zhangyt/OrientedRepPoints/mmdet/utils/registry.py", line 79, in build_from_cfg return obj_cls(**args) File "/home/zhangyt/OrientedRepPoints/mmdet/models/detectors/orientedreppoints_detector.py", line 22, in __init__ pretrained) File "/home/zhangyt/OrientedRepPoints/mmdet/models/detectors/single_stage.py", line 31, in __init__ self.init_weights(pretrained=pretrained) File "/home/zhangyt/OrientedRepPoints/mmdet/models/detectors/single_stage.py", line 35, in init_weights self.backbone.init_weights(pretrained=pretrained) File "/home/zhangyt/OrientedRepPoints/mmdet/models/backbones/swin_transformer.py", line 595, in init_weights load_checkpoint(self, pretrained, strict=False, logger=logger) File "/home/zhangyt/OrientedRepPoints/mmcv_custom/checkpoint.py", line 306, in load_checkpoint checkpoint = _load_checkpoint(filename, map_location) File "/home/zhangyt/OrientedRepPoints/mmcv_custom/checkpoint.py", line 282, in _load_checkpoint checkpoint = torch.load(filename, map_location=map_location) File "/home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/serialization.py", line 527, in load with _open_zipfile_reader(f) as opened_zipfile: File "/home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/serialization.py", line 224, in __init__ super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /opt/conda/conda-bld/pytorch_1579022060824/work/caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. A$tempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at /opt/conda/conda-bld/pytorch_1579022060824/work/caffe2/serialize/inline_container.cc:132) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7efc0602d627 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libc10.so) frame #1: caffe2::serialize::PyTorchStreamReader::init() + 0x1f5b (0x7efc0a8fe9ab in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch.so) frame #2: caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::string const&) + 0x64 (0x7efc0a8ffbc4 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch.so) frame #3: <unknown function> + 0x6d2146 (0x7efc3855e146 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #4: <unknown function> + 0x28ba06 (0x7efc38117a06 in /home/zhangyt/miniconda3/envs/orientedreppoints/lib/python3.7/site-packages/torch/lib/libtorch_python.so) <omitting python frames> frame #6: python() [0x4d4352] frame #8: python() [0x4d0e59] frame #10: python() [0x4ba1a9] frame #14: python() [0x4d0c7e] frame #16: python() [0x4ba1a9] frame #20: python() [0x4ba06f] frame #24: python() [0x4ba06f] frame #28: python() [0x4ba06f] frame #32: python() [0x4ba06f] frame #36: python() [0x4ba06f] frame #40: python() [0x4ba06f] frame #44: python() [0x4d0c7e] frame #45: python() [0x4bbe28] frame #50: python() [0x4ba06f] frame #54: python() [0x4ba06f] frame #58: python() [0x4ba06f] frame #61: python() [0x4ba06f]
The text was updated successfully, but these errors were encountered: