You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I had to change this in the walk_through.ipynb file and the data_loader.py file as well
But even after this I get a Type Error:
TypeError: 'float' object cannot be interpreted as an integer
Here is the output:
TypeError Traceback (most recent call last)
in ()
2 depthmaps = []
3 for i in tqdm(range(1)):
----> 4 dat = data_generator.next()
5
6 disparity_map_left, disparity_map_right = disp_maps_forward.predict(dat[0][0:10])
~/PycharmProjects/tensorplay/venv/w-net-master/data_loader.py in train_generator_func()
50 def train_generator_func():
51 while True:
---> 52 X = train_generator1.next(self)
53 Y1 = train_generator2.next(self)
54 yield X, [Y1, np.zeros(shape=(Y1.shape[0], img_rows - 4, img_cols - 4)),
~/PycharmProjects/tensorplay/venv/lib/python3.6/site-packages/keras_preprocessing/image.py in next(self)
1817 # The transformation of images is not under thread lock
1818 # so it can be done in parallel
-> 1819 return self._get_batches_of_transformed_samples(index_array)
~/PycharmProjects/tensorplay/venv/lib/python3.6/site-packages/keras_preprocessing/image.py in _get_batches_of_transformed_samples(self, index_array)
1763 batch_x = np.zeros(
1764 (len(index_array),) + self.image_shape,
-> 1765 dtype=backend.floatx())
1766 # build batch of image data
1767 for i, j in enumerate(index_array):
TypeError: 'float' object cannot be interpreted as an integer
I am unable to fix this. Please help..
The text was updated successfully, but these errors were encountered:
I got an error at the very last section of the w_net_walk_through.ipynb file :
----> 4 dat = data_generator.next()
5
6 disparity_map_left, disparity_map_right = disp_maps_forward.predict(dat[0][0:10])
AttributeError: 'generator' object has no attribute 'next'
After going through https://stackoverflow.com/questions/1073396/is-generator-next-visible-in-python-3-0 , I found that on python 3 you need to use data_generator.next() or next(data_generator).
Note: I had to change this in the walk_through.ipynb file and the data_loader.py file as well
But even after this I get a Type Error:
TypeError: 'float' object cannot be interpreted as an integer
Here is the output:
TypeError Traceback (most recent call last)
in ()
2 depthmaps = []
3 for i in tqdm(range(1)):
----> 4 dat = data_generator.next()
5
6 disparity_map_left, disparity_map_right = disp_maps_forward.predict(dat[0][0:10])
~/PycharmProjects/tensorplay/venv/w-net-master/data_loader.py in train_generator_func()
50 def train_generator_func():
51 while True:
---> 52 X = train_generator1.next(self)
53 Y1 = train_generator2.next(self)
54 yield X, [Y1, np.zeros(shape=(Y1.shape[0], img_rows - 4, img_cols - 4)),
~/PycharmProjects/tensorplay/venv/lib/python3.6/site-packages/keras_preprocessing/image.py in next(self)
1817 # The transformation of images is not under thread lock
1818 # so it can be done in parallel
-> 1819 return self._get_batches_of_transformed_samples(index_array)
~/PycharmProjects/tensorplay/venv/lib/python3.6/site-packages/keras_preprocessing/image.py in _get_batches_of_transformed_samples(self, index_array)
1763 batch_x = np.zeros(
1764 (len(index_array),) + self.image_shape,
-> 1765 dtype=backend.floatx())
1766 # build batch of image data
1767 for i, j in enumerate(index_array):
TypeError: 'float' object cannot be interpreted as an integer
I am unable to fix this. Please help..
The text was updated successfully, but these errors were encountered: