I download the SAM model and parameter from the official website and then try to re-train the network. When I try to do the back-propagation, then there is an error called: RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn The training network is as: url = "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth" checkpoint_path = "sam_vit_b_01ec64.pth" if not os.path.exists(checkpoint_path): with requests.get(url, stream=True) as r: r.raise_for_status() with open(checkpoint_path, 'wb') as f: for chunk in r.iter_content(chunk_size=8192): f.write(chunk) print("Checkpoint downloaded.") model_type = "vit_b" checkpoint = "sam_vit_b_01ec64.pth" model = sam_model_registry\[model_type\](checkpoint=checkpoint) Is there someone can help. Thanks a lot loll. Continue reading...