Skip to content

Commit 3768cdf

Browse files
committed
fix weight loading bug
1 parent e6ef94b commit 3768cdf

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,5 @@ configs/local/default.yaml
152152

153153
# Aim logging
154154
.aim
155+
156+
evaluations/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ Then please follow the instructions in the [CortexBench README](https://github.c
204204

205205
<details>
206206
<summary><b>Camera Pose Evaluation</b></summary>
207+
207208
To reproduce the camera pose evaluation, we have open-sourced the code in [evaluation/probe3d](evaluation/probe3d). Please first run `git submodule update --init --recursive` and `cd evaluation/probe3d`. Then follow the instructions in [probe3d](https://github.com/HaoyiZhu/probe3d/blob/main/data_processing/README.md) to prepare the **NAVI** dataset. Finally, run the following command to evaluate SPA:
208209

209210
```console

spa/models/components/spa.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def load_pretrained(self, ckpt_name: str = None):
132132
repo_id="HaoyiZhu/SPA", filename=f"{ckpt_name}.ckpt"
133133
)
134134
state_dict = torch.load(ckpt_file)["state_dict"]
135-
135+
# remove "model." prefix
136+
state_dict = {k[6:]: v for k, v in state_dict.items()}
136137
self.load_state_dict(state_dict, strict=True)
137138

138139
def init_data_processor(self):

0 commit comments

Comments
 (0)