vsitzmann / siren

Official implementation of "Implicit Neural Representations with Periodic Activation Functions"
MIT License
1.72k stars 247 forks source link

model.cuda() and self.model.load_state_dict(torch.load(opt.checkpoint_path)) are very slow #44

Closed Philipflyg closed 2 years ago

Philipflyg commented 3 years ago

When i try to train sdf, i found it will take a long time to call model.cuda() in file train_sdf.py. (just after printing the model) Also when testing sdf, self.model.load_state_dict(torch.load(opt.checkpoint_path)) need a lot of time.

My pytorch and cudatookit are installed according to file environment.yml. ( pytorch=1.5.0=py3.6_cuda10.1.243_cudnn7.6.3_0 )

How can i solve the issue? Is it normal to have such a problem?

juanraul8 commented 2 years ago

I had a similar issue. I just installed a newer pytorch version where the cuda installed with pytorch matched with the cuda installed on my system.

Philipflyg commented 2 years ago

I had a similar issue. I just installed a newer pytorch version where the cuda installed with pytorch matched the cuda installed on my system.

tks,i have solved the issue using the same method