qubvel / segmentation_models

Segmentation models with pretrained backbones. Keras and TensorFlow Keras.
MIT License
4.76k stars 1.03k forks source link

'AttributeError' when creating model. #367

Open jwegas opened 4 years ago

jwegas commented 4 years ago

Hi! I got an error when tryied to create model like model = smk.Unet() AttributeError: Can't set the attribute "name", likely because it conflicts with an existing read-only @property of the object. Please choose a different name.

After I commented line 82: model.name = 'u-{}'.format(backbone_name) in file _site-packages/segmentationmodels/unet/model.py everything works well.

I think it's possible to replace string model.name with model._name for example.

KuldeepSangwan commented 3 years ago

I am getting the same error but commenting it give some more errors