Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

train_sampler.py - IndexError #97

Open
tlsdmswn01 opened this issue Jan 6, 2024 · 0 comments
Open

train_sampler.py - IndexError #97

tlsdmswn01 opened this issue Jan 6, 2024 · 0 comments

Comments

@tlsdmswn01
Copy link

Hello!

I'm writing because I've been encountering an unknown error in the "train_sampler.py" script. Currently, I'm running the following code:

bash
Copy code
!python train_sampler.py simpsons_face --iter 100 --exstyle_path /home/alpaco/sej/DualStyleGAN/checkpoint/simpsons_face/refined_exstyle_code.npy
During execution, I get the following error:

plaintext
Copy code
Load options
exstyle_path: /home/alpaco/sej/DualStyleGAN/checkpoint/simpsons_face/refined_exstyle_code.npy
iter: 500000
model_name: sampler.pt
model_path: ./checkpoint/
style: simpsons_face


Load extrinsic style codes successfully!
Traceback (most recent call last):
File "train_sampler.py", line 56, in
icptc.train_icp(int(500000/WC.shape[0]))
File "/home/alpaco/sej/DualStyleGAN/model/sampler/icp.py", line 118, in train_icp
self.icp.train(self.f_np, uncca_opt_params)
File "/home/alpaco/sej/DualStyleGAN/model/sampler/icp.py", line 59, in train
self.train_epoch(z_np, epoch)
File "/home/alpaco/sej/DualStyleGAN/model/sampler/icp.py", line 99, in train_epoch
e = torch.from_numpy(e_np[indices[rp[idx_np]]]).float().cuda()
IndexError: index -4709754648454915060 is out of bounds for axis 0 with size 1792
I keep encountering an IndexError, and I'm not sure how to resolve it. Any suggestions?

If you could provide an advanced English translation of this content, that would be great.

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

No branches or pull requests

1 participant