diff --git a/README.md b/README.md index 1638c67..caff4ed 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,14 @@ sh slurm_test.sh {JOB_NAME} {NUM_GPU} {TRAIN_OUTPUT_DIR} {CKPT_ID} - NUM_GPU = 1 is recommended for testing - Logs and results will be saved to `SMPLer-X/output/test_{JOB_NAME}_ep{CKPT_ID}_{TEST_DATSET}` +## FAQ +- `RuntimeError: Subtraction, the '-' operator, with a bool tensor is not supported. If you are trying to invert a mask, use the '~' or 'logical_not()' operator instead.` + + Follow [this post](https://github.com/mks0601/I2L-MeshNet_RELEASE/issues/6#issuecomment-675152527) and modify `torchgeometry` + +- `KeyError: 'SinePositionalEncoding is already registered in position encoding'` or any other similar KeyErrors due to duplicate module registration. + + Maually add `force=True` to respective module registration under `main/transformer_utils/mmpose/models/utils`, e.g. `@POSITIONAL_ENCODING.register_module(force=True)` in [this file](main/transformer_utils/mmpose/models/utils/positional_encoding.py) ## References - [Hand4Whole](https://github.com/mks0601/Hand4Whole_RELEASE) diff --git a/main/transformer_utils/mmpose/models/utils/positional_encoding.py b/main/transformer_utils/mmpose/models/utils/positional_encoding.py index 4d3882c..3c7e6ba 100644 --- a/main/transformer_utils/mmpose/models/utils/positional_encoding.py +++ b/main/transformer_utils/mmpose/models/utils/positional_encoding.py @@ -6,7 +6,7 @@ from mmcv.cnn.bricks.transformer import POSITIONAL_ENCODING from mmcv.runner import BaseModule -@POSITIONAL_ENCODING.register_module() +@POSITIONAL_ENCODING.register_module(force=True) class SinePositionalEncoding(BaseModule): """Position encoding with sine and cosine functions. See `End-to-End Object Detection with Transformers @@ -98,7 +98,7 @@ class SinePositionalEncoding(BaseModule): return repr_str -@POSITIONAL_ENCODING.register_module() +@POSITIONAL_ENCODING.register_module(force=True) class LearnedPositionalEncoding(BaseModule): """Position embedding with learnable embedding weights. Args: diff --git a/main/transformer_utils/mmpose/models/utils/transformer.py b/main/transformer_utils/mmpose/models/utils/transformer.py index bfb0a26..4220570 100644 --- a/main/transformer_utils/mmpose/models/utils/transformer.py +++ b/main/transformer_utils/mmpose/models/utils/transformer.py @@ -564,7 +564,7 @@ class DetrTransformerDecoderLayer_grouped(BaseTransformerLayer): return query -@TRANSFORMER_LAYER_SEQUENCE.register_module(froce=True) +@TRANSFORMER_LAYER_SEQUENCE.register_module(force=True) class DeformableDetrTransformerDecoder(TransformerLayerSequence): """Implements the decoder in DETR transformer. Args: