-
Notifications
You must be signed in to change notification settings - Fork 72
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
Subscriptable Error #7
Comments
Hello @czainab, can you kindly mail me the dataset too? |
if you are running it in python3, then filter doesnt return list but an iterable filter object. So use list before filter and it should work |
Well I downloaded the images in test, train text file from ADNI website. You can just simply apply for the access. |
Can you please guide me how you were able to run this file because I am like getting errors on every line. I just fix one error and got another on the very next line. |
look at #1, where he explained how to run the code. Kindly tell me if it runs |
Still getting the same error TypeError: 'filter' object is not subscriptable. |
I noticed you are running this using anaconda3 which as python 3+. kindly try running this using python2. |
Hey, so i took the access of the ADNI data, can you kindly guide me what to do after that? i cant seem to find the data. |
After login go to Projects, than ADNI, than click on Download, Image Collection and under Data Collection tab you will find the images.
On Thursday, May 10, 2018 3:05 PM, Mrinal18 <[email protected]> wrote:
Hey, so i took the access of the ADNI data, can you kindly guide me what to do after that? i cant seem to find the data.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@czainab , replace it with this
|
Did this code worked . Please let me know |
please tell me how to solve this issue, if you have resolved it |
F:\VAIO\Latest\AD_Prediction-master\AD_Prediction-master\2D>python main_alextnet.py
2018-05-05 16:00:35 INFO: At 0-th epoch.
Traceback (most recent call last):
File "main_alextnet.py", line 236, in
main(options)
File "main_alextnet.py", line 135, in main
train_loss, correct_cnt = train(model, train_loader, use_cuda, criterion, optimizer, train_loss_f)
File "main_alextnet.py", line 160, in train
for it, train_data in enumerate(train_loader):
File "C:\Users\Hashim\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 281, in next
return self._process_next_batch(batch)
File "C:\Users\Hashim\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 301, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: Traceback (most recent call last):
File "C:\Users\Hashim\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 55, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "C:\Users\Hashim\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 55, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "F:\VAIO\Latest\AD_Prediction-master\AD_Prediction-master\2D\AD_2DRandomSlicesData.py", line 56, in getitem
AXimageList = axRandomSlice(image)
File "F:\VAIO\Latest\AD_Prediction-master\AD_Prediction-master\2D\AD_2DRandomSlicesData.py", line 94, in axRandomSlice
return getRandomSlice(image_array, NON_AX, AX_F, AX_SCETION)
File "F:\VAIO\Latest\AD_Prediction-master\AD_Prediction-master\2D\AD_2DRandomSlicesData.py", line 73, in getRandomSlice
first_p = list(mean_array).index(filter(lambda x: x>0, mean_array)[0])
TypeError: 'filter' object is not subscriptable
I just ran your code with your dataset but I get this type error and unable to figure it out. Kindly help me resolving this error
The text was updated successfully, but these errors were encountered: