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

'numpy.ndarray' object is not callable #2

Open
sureshkumar0707 opened this issue May 31, 2019 · 3 comments
Open

'numpy.ndarray' object is not callable #2

sureshkumar0707 opened this issue May 31, 2019 · 3 comments

Comments

@sureshkumar0707
Copy link

Error:

Total Number of Trainable Parameters: 1550914
Preparing the estimator..
batch size : 16
Initialising data loader ...
Traceback (most recent call last):
File "runner.py", line 50, in
config = conf
File "C:\Users\SKP\Prac2\5-15-2019 - Best Day\Pro1\src\estimator.py", line 30, in init
self.data_iterator = ITERATOR(self.conf.data_folder, mode = 'train', batch_size = self.conf.batch_size, num_threads=1)
File "C:\Users\SKP\Prac2\5-15-2019 - Best Day\Pro1\src\data_loader.py", line 103, in init
self.getFilePaths(data_folder_path)
File "C:\Users\SKP\Prac2\5-15-2019 - Best Day\Pro1\src\data_loader.py", line 113, in getFilePaths
self.train_fls = np.squeeze(train_valid_paths[train_valid_paths['Training']]['Slice Path'].values()).tolist()
TypeError: 'numpy.ndarray' object is not callable
Thread exited

Doubt 1: Can you provide the link of the website about the Dataset. I need
some meta data.

@sureshkumar0707 sureshkumar0707 changed the title Object was not callable 'numpy.ndarray' object is not callable May 31, 2019
@sureshkumar0707
Copy link
Author

sureshkumar0707 commented May 31, 2019

How to use this?

fetch inputs batches and verify if they are numpy.ndarray and run all the ops

`while (count < steps):
start_time = time.time()

		# fetch inputs batches and verify if they are numpy.ndarray and run all the ops
		# g_time = time.time()
		input_batch, target_batch, weight_batch = self.data_iterator.getNextBatch()
		# print("time taken to get a batch : " + str(time.time()-g_time) + 's')
		
		
		if type(input_batch) is np.ndarray:

			feed = {self.net.inputs : input_batch,
					self.net.targets : target_batch,
					self.net.weight_maps : weight_batch,
					self.net.is_training : True}
			input_batch, target_batch, weight_batch = None, None, None`

@koriavinash1
Copy link
Owner

koriavinash1 commented May 31, 2019

it seems that your train_valid_paths is numpy array instead of a data frame, Please make sure that train_valid_paths is pandas df object before continuing.

The data for this project is taken from the following bitbucket repo: https://bitbucket.org/bchradiology/u-net/src/master/

@sureshkumar0707
Copy link
Author

I have attached my coding py files.

https://drive.google.com/open?id=12bs3SamXMv2Z-btBa9vtdhYX3tOQu0WR

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