Traceback (most recent call last):
File "train_net.py", line 73, in
launch(
File "/root/autodl-tmp/detectron2/detectron2/engine/launch.py", line 62, in launch
main_func(*args)
File "train_net.py", line 63, in main
trainer = Trainer(cfg)
File "/root/autodl-tmp/adaptive_teacher/adapteacher/engine/trainer.py", line 290, in init
model = self.build_model(cfg)
File "/root/autodl-tmp/detectron2/detectron2/engine/defaults.py", line 434, in build_model
model = build_model(cfg)
File "/root/autodl-tmp/detectron2/detectron2/modeling/meta_arch/build.py", line 21, in build_model
model = META_ARCH_REGISTRY.get(meta_arch)(cfg)
File "/root/autodl-tmp/detectron2/detectron2/config/config.py", line 182, in wrapped
init_func(self, **explicit_args)
File "/root/autodl-tmp/adaptive_teacher/adapteacher/modeling/meta_arch/rcnn.py", line 96, in init
self.register_buffer("pixel_mean", torch.tensor(pixel_mean).view(-1, 1, 1), False)
TypeError: register_buffer() takes 3 positional arguments but 4 were given
I followed your method but encountered this error
Traceback (most recent call last): File "train_net.py", line 73, in
launch(
File "/root/autodl-tmp/detectron2/detectron2/engine/launch.py", line 62, in launch
main_func(*args)
File "train_net.py", line 63, in main
trainer = Trainer(cfg)
File "/root/autodl-tmp/adaptive_teacher/adapteacher/engine/trainer.py", line 290, in init
model = self.build_model(cfg)
File "/root/autodl-tmp/detectron2/detectron2/engine/defaults.py", line 434, in build_model
model = build_model(cfg)
File "/root/autodl-tmp/detectron2/detectron2/modeling/meta_arch/build.py", line 21, in build_model
model = META_ARCH_REGISTRY.get(meta_arch)(cfg)
File "/root/autodl-tmp/detectron2/detectron2/config/config.py", line 182, in wrapped
init_func(self, **explicit_args)
File "/root/autodl-tmp/adaptive_teacher/adapteacher/modeling/meta_arch/rcnn.py", line 96, in init
self.register_buffer("pixel_mean", torch.tensor(pixel_mean).view(-1, 1, 1), False)
TypeError: register_buffer() takes 3 positional arguments but 4 were given
I followed your method but encountered this error