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

I have a ValueError in code Utils.py #10

Open
IamSVP94 opened this issue Dec 8, 2022 · 0 comments
Open

I have a ValueError in code Utils.py #10

IamSVP94 opened this issue Dec 8, 2022 · 0 comments

Comments

@IamSVP94
Copy link

IamSVP94 commented Dec 8, 2022

I tried to run op.py with the next command:

python op.py --dataset utk --regression global --experiment_setting coral --im_path UTKFace

But I have a problem with inhomogeneous part of sequence.
The full error text:

  File "/home/vid/hdd/projects/PycharmProjects/MWR2/code/op.py", line 62, in <module>
    global_regression(args, train_data, test_data, sampling=sampling, sample_rate=sample_rate)
  File "/home/vid/hdd/projects/PycharmProjects/MWR2/code/Prediction.py", line 99, in global_regression
    refer_idx, refer_idx_pair = select_reference_global_regression(train_data, pair_idx, np.array(loss_total), limit=1)
  File "/home/vid/hdd/projects/PycharmProjects/MWR2/code/Utils.py", line 98, in select_reference_global_regression
    y_1_idx_tmp, y_2_idx_tmp = idx[row], np.array(pair_idx)[idx[0]][column]
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (6582,) + inhomogeneous part.

How to fix it?

Screenshot from 2022-12-08 18-15-20

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