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

axes don't match array error while training #11

Open
svabhishek29 opened this issue Aug 10, 2017 · 3 comments
Open

axes don't match array error while training #11

svabhishek29 opened this issue Aug 10, 2017 · 3 comments

Comments

@svabhishek29
Copy link

Hi,
I was playing around with the code to better understand how things work. when i was trying to train the luna 16 images i keep getting the error 'axes don't match array' on the line

for batch_idx, (data, target) in enumerate(trainLoader):

in both train_nll and train_dice.

i normalised the images using normalise function in the torchbiomed library with 512, 512, 500, 0.7 as parameters for normalisation.

i am not understanding why i am getting this error hence not able to fix it.

it'll be a great help if you can help me get past this point.

Thanks
Abhishek Venkataram

@abhiML
Copy link

abhiML commented Mar 25, 2018

Hi @svabhishek29 did you resolve this issue?

@svabhishek29
Copy link
Author

svabhishek29 commented Mar 25, 2018

yes, i did find where the problem was.

it was in the def __getitem_dev(self, index): method of torchbiomed library, specifically the Luna16.py file.

if i remember right the issues was in one of the the 3 if conditions starting at line 417.

if self.transform is not None:
    img = self.transform(img)
if self.target_transform is not None:
    target = self.target_transform(target)
if self.co_transform is not None:
    img, target = self.co_transform(img, target)

I realised that i needed it to behave a bit differently so i wrote my own code, did not fix that problem specifically.

sorry i can't be of much help.

@abhiML
Copy link

abhiML commented Mar 26, 2018

Actually I am having some difficulty on getting the code to run on the dataset (Luna16). Could you very kindly clear a few queries for me?
Does the code do some preprocessing on the dataset or is the script for preprocessing not provided in the code?
How do I run the code on the dataset? Do I use the same directory structure as the Luna16 dataset? What are the changes in the code I have to make to start the training?

Thanks in advance.

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