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
Running train.py and with the code fix for #10, I now get the error: cannot reshape array of size 3850108 into shape (2048,2048)
[...]/segmentation$ python3 train.py
train.py
>> Generate network - v1.1
>> Load data
>>> Total # of trainset : 7
>>> Total # of valset : 1
>> Train Network - [1 epoch]
Traceback (most recent call last):
File "train.py", line 208, in <module>
main()
File "train.py", line 111, in main
for i, data in enumerate(trainloader, 0):
File "/[...]/anaconda3/envs/Oh_et_al_2020/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in __next__
data = self._next_data()
File "/[...]/anaconda3/envs/Oh_et_al_2020/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/[...]/anaconda3/envs/Oh_et_al_2020/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/[...]/anaconda3/envs/Oh_et_al_2020/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/[...]/Deep-Learning-COVID-19-on-CXR-using-Limited-Training-Data-Sets/segmentation/mydataset.py", line 62, in __getitem__
images = np.asarray(np.reshape(np.fromfile(self.images[index], dtype='>u2', sep="", ), (header.orig_height, header.orig_width)))
File "<__array_function__ internals>", line 6, in reshape
File "/[...]/anaconda3/envs/Oh_et_al_2020/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 301, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/[...]/anaconda3/envs/Oh_et_al_2020/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 61, in _wrapfunc
return bound(*args, **kwds)
ValueError: cannot reshape array of size 3850108 into shape (2048,2048)
Some incorrect assumptions about the data set, somehow?
The text was updated successfully, but these errors were encountered:
Running train.py and with the code fix for #10, I now get the error:
cannot reshape array of size 3850108 into shape (2048,2048)
Some incorrect assumptions about the data set, somehow?
The text was updated successfully, but these errors were encountered: