Skip to content

Update model.py#1

Open
fcy540 wants to merge 1 commit intoSpatial-Data-Science-and-GEO-AI-Lab:masterfrom
fcy540:patch-2
Open

Update model.py#1
fcy540 wants to merge 1 commit intoSpatial-Data-Science-and-GEO-AI-Lab:masterfrom
fcy540:patch-2

Conversation

@fcy540
Copy link
Copy Markdown

@fcy540 fcy540 commented Dec 22, 2024

When using GPU acceleration, we need to modify SVIPerceptPipeline(batch_size=32) in the example.py to SVIPerceptPipeline(batch_size=32, device="cuda"). Also, in the model.py, change results[:, cat_i] = torch.sum(kscores * kweights, dim=1) to results[:, cat_i] = torch.sum(kscores * kweights, dim=1).cpu().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant