facebookresearch / facebookresearch/sam2

RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

Open
#540 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
19.9k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I just use
python training/train.py -c configs/sam2.1_training/sam2.1_hiera_b+_MOSE_finetune.yaml --use-cluster 0 --num-gpus 1

and i got

![Image](https://github.com/user-attachments/assets/603260b4-209d-4539-834a-2681e028c05c)
plz help! orz
=========================================================================
my pip list:

Package Version Editable project location

------------------------- ------------------ -------------------------

absl-py 2.1.0

antlr4-python3-runtime 4.9.3

anyio 4.6.2.post1

argon2-cffi 23.1.0

argon2-cffi-bindings 21.2.0

arrow 1.3.0

asttokens 2.4.1

async-lru 2.0.4

attrs 24.2.0

babel 2.16.0

beautifulsoup4 4.12.3

bleach 6.2.0

certifi 2024.8.30

cffi 1.17.1

charset-normalizer 3.4.0

cloudpickle 3.1.0

comm 0.2.2

contourpy 1.3.1

cycler 0.12.1

debugpy 1.8.9

decorator 5.1.1

defusedxml 0.7.1

eva-decord 0.6.1

exceptiongroup 1.2.2

executing 2.1.0

fastjsonschema 2.20.0

filelock 3.16.1

fonttools 4.55.0

fqdn 1.5.1

fsspec 2024.10.0

fvcore 0.1.5.post20221221

grpcio 1.69.0

h11 0.14.0

httpcore 1.0.7

httpx 0.27.2

hydra-core 1.3.2

idna 3.10

iopath 0.1.10

ipykernel 6.29.5

ipython 8.29.0

ipywidgets 8.1.5

isoduration 20.11.0

jedi 0.19.2

Jinja2 3.1.4

json5 0.9.28

jsonpointer 3.0.0

jsonschema 4.23.0

jsonschema-specifications 2024.10.1

jupyter 1.1.1

jupyter_client 8.6.3

jupyter-console 6.6.3

jupyter_core 5.7.2

jupyter-events 0.10.0

jupyter-lsp 2.2.5

jupyter_server 2.14.2

jupyter_server_terminals 0.5.3

jupyterlab 4.2.6

jupyterlab_pygments 0.3.0

jupyterlab_server 2.27.3

jupyterlab_widgets 3.0.13

kiwisolver 1.4.7

Markdown 3.7

MarkupSafe 3.0.2

matplotlib 3.9.2

matplotlib-inline 0.1.7

mistune 3.0.2

mpmath 1.3.0

nbclient 0.10.0

nbconvert 7.16.4

nbformat 5.10.4

nest-asyncio 1.6.0

networkx 3.4.2

notebook 7.2.2

notebook_shim 0.2.4

numpy 2.1.3

nvidia-cublas-cu12 12.1.3.1

nvidia-cuda-cupti-cu12 12.1.105

nvidia-cuda-nvrtc-cu12 12.1.105

nvidia-cuda-runtime-cu12 12.1.105

nvidia-cudnn-cu12 9.1.0.70

nvidia-cufft-cu12 11.0.2.54

nvidia-curand-cu12 10.3.2.106

nvidia-cusolver-cu12 11.4.5.107

nvidia-cusparse-cu12 12.1.0.106

nvidia-nccl-cu12 2.21.5

nvidia-nvjitlink-cu12 12.4.127

nvidia-nvtx-cu12 12.1.105

omegaconf 2.3.0

opencv-python 4.10.0.84

orjson 3.10.12

overrides 7.7.0

packaging 24.2

pandas 2.2.3

pandocfilters 1.5.1

parso 0.8.4

pexpect 4.9.0

pillow 11.0.0

pip 24.3.1

platformdirs 4.3.6

portalocker 3.0.0

prometheus_client 0.21.0

prompt_toolkit 3.0.48

protobuf 5.29.3

psutil 6.1.0

ptyprocess 0.7.0

pure_eval 0.2.3

pycocotools 2.0.8

pycparser 2.22

Pygments 2.18.0

pyparsing 3.2.0

python-dateutil 2.9.0.post0

python-json-logger 2.0.7

pytz 2024.2

PyYAML 6.0.2

pyzmq 26.2.0

referencing 0.35.1

requests 2.32.3

rfc3339-validator 0.1.4

rfc3986-validator 0.1.1

rpds-py 0.21.0

SAM-2 1.0 /home/si2/sdragon/sam2

Send2Trash 1.8.3

setuptools 75.6.0

six 1.16.0

sniffio 1.3.1

soupsieve 2.6

stack-data 0.6.3

submitit 1.5.2

sympy 1.13.1

tabulate 0.9.0

tensorboard 2.18.0

tensorboard-data-server 0.7.2

tensordict 0.6.2

termcolor 2.5.0

terminado 0.18.1

tinycss2 1.4.0

tomli 2.1.0

torch 2.5.1+cu121

torchaudio 2.5.1+cu121

torchvision 0.20.1+cu121

tornado 6.4.2

tqdm 4.67.1

traitlets 5.14.3

triton 3.1.0

types-python-dateutil 2.9.0.20241003

typing_extensions 4.12.2

tzdata 2024.2

uri-template 1.3.0

urllib3 2.2.3

wcwidth 0.2.13

webcolors 24.11.1

webencodings 0.5.1

websocket-client 1.8.0

Werkzeug 3.1.3

wheel 0.45.1

widgetsnbextension 4.0.13

yacs 0.1.8

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.