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 have previously used this model for image classification tasks on ImageNet1k in the same environment. Now, I want to transfer the model weights to mmsegmentation for training on segmentation tasks.
Environment
sys.platform: linux
Python: 3.8.18 (default, Sep 11 2023, 13:40:15) [GCC 11.2.0]
CUDA available: True
numpy_random_seed: 2147483648
GPU 0,1: NVIDIA GeForce RTX 2080 Ti
CUDA_HOME: :/home/zhangbo/cuda-10.2
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.12.1+cu102
PyTorch compiling details: PyTorch built with:
- GCC 7.3
- C++ Version: 201402
- Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
- OpenMP 201511 (a.k.a. OpenMP 4.5)
- LAPACK is enabled (usually provided by MKL)
- NNPACK is enabled
- CPU capability usage: AVX2
- CUDA Runtime 10.2
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70
- CuDNN 7.6.5
- Magma 2.5.2
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=10.2, CUDNN_VERSION=7.6.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.12.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,
TorchVision: 0.13.1+cu102
OpenCV: 4.9.0
MMEngine: 0.10.2
MMSegmentation: 1.2.2+c685fe6
**Error traceback**
```none
Traceback (most recent call last):
File "tools/train.py", line 105, in <module>
main()
File "tools/train.py", line 94, in main
runner = Runner.from_cfg(cfg)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/runner/runner.py", line 462, in from_cfg
runner = cls(
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/runner/runner.py", line 429, in __init__
self.model = self.build_model(model)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/runner/runner.py", line 836, in build_model
model = MODELS.build(model)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/data/datas/hcz/mmsegmentation/mmseg/models/segmentors/encoder_decoder.py", line 89, in __init__
self.backbone = MODELS.build(backbone)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/data/datas/hcz/mmsegmentation/mmseg/models/backbones/fpvt.py", line 662, in fpvt_tiny
model = PyramidVisionTransformerV2(
TypeError: __init__() got an unexpected keyword argument 'style'
Traceback (most recent call last):
File "tools/train.py", line 105, in <module>
main()
File "tools/train.py", line 94, in main
runner = Runner.from_cfg(cfg)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/runner/runner.py", line 462, in from_cfg
runner = cls(
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/runner/runner.py", line 429, in __init__
self.model = self.build_model(model)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/runner/runner.py", line 836, in build_model
model = MODELS.build(model)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/data/datas/hcz/mmsegmentation/mmseg/models/segmentors/encoder_decoder.py", line 89, in __init__
self.backbone = MODELS.build(backbone)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/data/datas/hcz/mmsegmentation/mmseg/models/backbones/fpvt.py", line 662, in fpvt_tiny
model = PyramidVisionTransformerV2(
TypeError: __init__() got an unexpected keyword argument 'style'
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 5205) of binary: /data/datas/hcz/envs/mmseg/bin/python
Traceback (most recent call last):
File "/data/datas/hcz/envs/mmseg/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/data/datas/hcz/envs/mmseg/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/torch/distributed/launch.py", line 193, in <module>
main()
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/torch/distributed/launch.py", line 189, in main
launch(args)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/torch/distributed/launch.py", line 174, in launch
run(args)
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/torch/distributed/run.py", line 752, in run
elastic_launch(
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 131, in __call__
return launch_agent(self._config, self._entrypoint, list(args))
File "/data/datas/hcz/envs/mmseg/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 245, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
============================================================
tools/train.py FAILED
------------------------------------------------------------
Failures:
[1]:
time : 2024-07-23_15:14:42
host : ubuntu
rank : 1 (local_rank: 1)
exitcode : 1 (pid: 5206)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
------------------------------------------------------------
Root Cause (first observed failure):
[0]:
time : 2024-07-23_15:14:42
host : ubuntu
rank : 0 (local_rank: 0)
exitcode : 1 (pid: 5205)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
============================================================
The text was updated successfully, but these errors were encountered:
I change the backbone of PVT
config
the command
I have previously used this model for image classification tasks on ImageNet1k in the same environment. Now, I want to transfer the model weights to mmsegmentation for training on segmentation tasks.
Environment
The text was updated successfully, but these errors were encountered: