Skip to content

Looking for help while debugging #2

@hhhljf

Description

@hhhljf

Thanks for Ur novel work. I am trying to train the model on Moya dataset. I followed the command of traing prived by you. When the runing the python file of models.networks, I met a error warning as follows:
Traceback (most recent call last):
File "/dg_hpc/CNG/lijf/ASCON-main/train.py", line 72, in
model.optimize_parameters() # calculate loss functions, get gradients, update network weights
File "/dg_hpc/CNG/lijf/ASCON-main/models/ASCON_model.py", line 128, in optimize_parameters
self.loss_D = self.compute_D_loss()
File "/dg_hpc/CNG/lijf/ASCON-main/models/ASCON_model.py", line 160, in compute_D_loss
self.loss_D = self.MAC_Net(self.real_B, self.fake_B.detach())
File "/dg_hpc/CNG/lijf/ASCON-main/models/ASCON_model.py", line 189, in MAC_Net
feat_k_pool_1, sample_ids, sample_local_ids, sample_top_idxs = self.netProjection_target(patch_size,feat_k_1, self.num_patches,None,None,None,pixweght=None)
File "/dg_workfs/CNG/lijf/miniconda3/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/dg_workfs/CNG/lijf/miniconda3/lib/python3.10/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward
return self.module(*inputs[0], **kwargs[0])
File "/dg_workfs/CNG/lijf/miniconda3/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/dg_hpc/CNG/lijf/ASCON-main/models/networks.py", line 130, in forward
N_patches=num_patches[feat_id]
IndexError: list index out of range
I have checked the value of num_patches. num_patches seems should be a array. However, I find num_patches is a predefined int value of 256. I wonder how to eliminate the error. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions