"Traceback (most recent call last):
File "tools/train.py", line 104, in
main()
File "tools/train.py", line 100, in main
runner.train()
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1735, in train
model = self.train_loop.run() # type: ignore
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/mmengine/runner/loops.py", line 278, in run
self.run_iter(data_batch)
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/mmengine/runner/loops.py", line 301, in run_iter
outputs = self.runner.model.train_step(
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 113, in train_step
data = self.data_preprocessor(data, True)
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/sargar.o/rstream/mmsegmentation/mmseg/models/data_preprocessor.py", line 132, in forward
inputs, data_samples = self.batch_augments(
TypeError: 'list' object is not callable
"
I want to use cutmix to train a segmenter model. I just edited the datapreprocessor in configs/base/models/segmenter_vit-b16_mask.py file
data_preprocessor = dict( type='SegDataPreProcessor', mean=[127.5, 127.5, 127.5], std=[127.5, 127.5, 127.5], bgr_to_rgb=True, pad_val=0, seg_pad_val=255, batch_augments=[ dict( type='CutMix', alpha=0.5 ) ] )
I'm getting this error when I run the experiment:
"Traceback (most recent call last): File "tools/train.py", line 104, in
main()
File "tools/train.py", line 100, in main
runner.train()
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1735, in train
model = self.train_loop.run() # type: ignore
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/mmengine/runner/loops.py", line 278, in run
self.run_iter(data_batch)
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/mmengine/runner/loops.py", line 301, in run_iter
outputs = self.runner.model.train_step(
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 113, in train_step
data = self.data_preprocessor(data, True)
File "/home/sargar.o/.conda/envs/mmsegmentation/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/sargar.o/rstream/mmsegmentation/mmseg/models/data_preprocessor.py", line 132, in forward
inputs, data_samples = self.batch_augments(
TypeError: 'list' object is not callable
"