Mask_RCNN
Mask_RCNN copied to clipboard
'ParallelModel' object has no attribute '_base_model_initialized'
Getting this error when trying to run with multiple GPUs on AWS sagemaker. Anybody seen something like this before and know how to proceed?
AttributeError Traceback (most recent call last) /usr/local/lib/python3.9/site-packages/keras/engine/training.py in setattr(self, name, value) 352 try: --> 353 self._base_model_initialized 354 except AttributeError:
~/DigAg/mrcnn/parallel_model.py in getattribute(self, attrname) 38 return getattr(self.inner_model, attrname) ---> 39 return super(ParallelModel, self).getattribute(attrname) 40
AttributeError: 'ParallelModel' object has no attribute '_base_model_initialized'
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call last)
~/DigAg/mrcnn/model.py in init(self, mode, config, model_dir) 1791 self.model_dir = model_dir 1792 self.set_log_dir() -> 1793 self.keras_model = self.build(mode=mode, config=config) 1794 1795 def build(self, mode, config):
~/DigAg/mrcnn/model.py in build(self, mode, config) 2031 if config.GPU_COUNT > 1: 2032 from mrcnn.parallel_model import ParallelModel -> 2033 model = ParallelModel(model, config.GPU_COUNT) 2034 2035 return model
~/DigAg/mrcnn/parallel_model.py in init(self, keras_model, gpu_count) 26 """ 27 super(ParallelModel, self).init() ---> 28 self.inner_model = keras_model 29 self.gpu_count = gpu_count 30 merged_outputs = self.make_parallel()
/usr/local/lib/python3.9/site-packages/keras/engine/training.py in setattr(self, name, value)
353 self._base_model_initialized
354 except AttributeError:
--> 355 raise RuntimeError(
356 "It looks like you are subclassing Model and you "
357 "forgot to call super().__init__()."
RuntimeError: It looks like you are subclassing Model and you forgot to call super().__init__(). Always start with this line.
The same problem here, did somebody fix it???
Was this error ever fixed? Having the same problem