Skip to content

AttributeError: 'BaseModelOutputWithPooling' object has no attribute 'norm' #12

@kevintsq

Description

@kevintsq
  File "/home/kevin/PE3R/modules/pe3r/demo.py", line 433, in get_reconstructed_scene
    cog_seg_maps, rev_cog_seg_maps, cog_feats = get_cog_feats(images, pe3r)
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kevin/anaconda3/envs/pe3r/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/kevin/PE3R/modules/pe3r/demo.py", line 381, in get_cog_feats
    image_features = image_features / image_features.norm(dim=-1, keepdim=True)
                                      ^^^^^^^^^^^^^^^^^^^
AttributeError: 'BaseModelOutputWithPooling' object has no attribute 'norm'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions