models/swin_transformer_3d.py [905:924]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if "classy_state_dict" in checkpoint:
            # checkpoints trained in omnivore
            state_dict = checkpoint["classy_state_dict"][self.pretrained_model_key][
                "model"
            ]["trunk"]
        else:
            # checkpoints trained outside omnivore
            state_dict = checkpoint["model"]

        # delete relative_position_index since we always re-init it
        relative_position_index_keys = [
            k for k in state_dict.keys() if "relative_position_index" in k
        ]
        for k in relative_position_index_keys:
            del state_dict[k]

        # delete attn_mask since we always re-init it
        attn_mask_keys = [k for k in state_dict.keys() if "attn_mask" in k]
        for k in attn_mask_keys:
            del state_dict[k]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



models/swin_transformer_3d.py [983:1002]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if "classy_state_dict" in checkpoint:
            # checkpoints trained in omnivore
            state_dict = checkpoint["classy_state_dict"][self.pretrained_model_key][
                "model"
            ]["trunk"]
        else:
            # checkpoints trained outside omnivore
            state_dict = checkpoint["model"]

        # delete relative_position_index since we always re-init it
        relative_position_index_keys = [
            k for k in state_dict.keys() if "relative_position_index" in k
        ]
        for k in relative_position_index_keys:
            del state_dict[k]

        # delete attn_mask since we always re-init it
        attn_mask_keys = [k for k in state_dict.keys() if "attn_mask" in k]
        for k in attn_mask_keys:
            del state_dict[k]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



