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
@LOSSES.register_module(force=True)
class DiceLoss(nn.Module):
otherwise I will get:
'On January 1, 2023, MMCV will release v2.0.0, in which it will remove '
/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmdet/datasets/pipelines/formating.py:7: UserWarning: DeprecationWarning: mmdet.datasets.pipelines.formating will be deprecated, please replace it with mmdet.datasets.pipelines.formatting.
warnings.warn('DeprecationWarning: mmdet.datasets.pipelines.formating will be '
Traceback (most recent call last):
File "table_recognition/tablemaster_infer.py", line 16, in
from mmocr.datasets import build_dataset # noqa: F401
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/datasets/init.py", line 5, in
from .kie_dataset import KIEDataset
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/datasets/kie_dataset.py", line 12, in
from mmocr.datasets.pipelines import sort_vertex8
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/datasets/pipelines/init.py", line 6, in
from .ner_transforms import NerTransform, ToTensorNER
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/datasets/pipelines/ner_transforms.py", line 4, in
from mmocr.models.builder import build_convertor
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/models/init.py", line 3, in
from . import common, kie, textdet, textrecog
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/models/common/init.py", line 1, in
from . import backbones, losses
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/models/common/losses/init.py", line 1, in
from .dice_loss import DiceLoss
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/models/common/losses/dice_loss.py", line 8, in
class DiceLoss(nn.Module):
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmcv/utils/registry.py", line 337, in _register
self._register_module(module=module, module_name=name, force=force)
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmcv/utils/misc.py", line 340, in new_func
output = old_func(*args, **kwargs)
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmcv/utils/registry.py", line 272, in _register_module
raise KeyError(f'{name} is already registered '
KeyError: 'DiceLoss is already registered in models'
Any other context?
No response
The text was updated successfully, but these errors were encountered:
What is the feature?
can you modify the code to:
@LOSSES.register_module(force=True)
class DiceLoss(nn.Module):
otherwise I will get:
'On January 1, 2023, MMCV will release v2.0.0, in which it will remove '
/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmdet/datasets/pipelines/formating.py:7: UserWarning: DeprecationWarning: mmdet.datasets.pipelines.formating will be deprecated, please replace it with mmdet.datasets.pipelines.formatting.
warnings.warn('DeprecationWarning: mmdet.datasets.pipelines.formating will be '
Traceback (most recent call last):
File "table_recognition/tablemaster_infer.py", line 16, in
from mmocr.datasets import build_dataset # noqa: F401
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/datasets/init.py", line 5, in
from .kie_dataset import KIEDataset
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/datasets/kie_dataset.py", line 12, in
from mmocr.datasets.pipelines import sort_vertex8
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/datasets/pipelines/init.py", line 6, in
from .ner_transforms import NerTransform, ToTensorNER
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/datasets/pipelines/ner_transforms.py", line 4, in
from mmocr.models.builder import build_convertor
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/models/init.py", line 3, in
from . import common, kie, textdet, textrecog
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/models/common/init.py", line 1, in
from . import backbones, losses
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/models/common/losses/init.py", line 1, in
from .dice_loss import DiceLoss
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmocr/models/common/losses/dice_loss.py", line 8, in
class DiceLoss(nn.Module):
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmcv/utils/registry.py", line 337, in _register
self._register_module(module=module, module_name=name, force=force)
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmcv/utils/misc.py", line 340, in new_func
output = old_func(*args, **kwargs)
File "/opt/conda/envs/tablemaster3/lib/python3.7/site-packages/mmcv/utils/registry.py", line 272, in _register_module
raise KeyError(f'{name} is already registered '
KeyError: 'DiceLoss is already registered in models'
Any other context?
No response
The text was updated successfully, but these errors were encountered: