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

imagerettrieval -pytorch #63

Open
shiva1407 opened this issue Feb 27, 2020 · 2 comments
Open

imagerettrieval -pytorch #63

shiva1407 opened this issue Feb 27, 2020 · 2 comments

Comments

@shiva1407
Copy link

i am using Kaggle to run my code
for i, row in df_train.iterrows():
id = int(row.id)
for j in range(aug_size):
im = cv2.imread(path.join(dir,f'{id:.0f}.{j}.png'))
x[c * aug_size + j, 0, :, :] = t.from_numpy(im).squeeze()
y[c * aug_size + j][0] = row.malignancy_th
c += 1

errors met:
RuntimeError: expand(torch.ByteTensor{[32, 32, 3]}, size=[32, 32]): the number of sizes provided (2) must be greater or equal to the number of dimensions in the tensor (3)

@shiva1407
Copy link
Author

please help me to fix this bug

@filipradenovic
Copy link
Owner

Please take a look at our cirtorch.examples.test script to see how we load and preprocess images.

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

2 participants