Closed meredithmjackson closed 5 years ago
Hi Meredith, this sounds like a very nice project! The images are indeed extremely large. Wondering if the network would fit into your GPU's memory with the entire resolution event if you use the Dataset API. Have you considered to run the training / prediction on image crops and then reassembling them?
I was trying to avoid doing that, but that may have to be the solution. I reduced the images by a factor of 25, and removed the NIR channel so they are shape (2196,2196,3) and it is working now.
I would like to run this project on satellite images and am running into a memory error (disguised as 'InternalError: Dst tensor is not initialized.') due to the size of the images. I have downloaded the repository and am trying to edit the code to suit my needs. I am working with Sentinel-2 data and the images are type uint16 with shape (10980, 10980) and have 4 channels (R,G,B & NIR). The images are in .tif file format and I am using GDAL (instead of cv2 or PIL) to open the files and convert to numpy array in float32.
Specifically, I am looking for help with substituting feed_dict with an input pipeline, such as Dataset API. I am somewhat new to Tensorflow so any help and guidance is appreciated.
InternalError Traceback (most recent call last) ~\Anaconda3\envs\geoML\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, args) 1277 try: -> 1278 return fn(args) 1279 except errors.OpError as e:
~\Anaconda3\envs\geoML\lib\site-packages\tensorflow\python\client\session.py in _run_fn(feed_dict, fetch_list, target_list, options, run_metadata) 1262 return self._call_tf_sessionrun( -> 1263 options, feed_dict, fetch_list, target_list, run_metadata) 1264
~\Anaconda3\envs\geoML\lib\site-packages\tensorflow\python\client\session.py in _call_tf_sessionrun(self, options, feed_dict, fetch_list, target_list, run_metadata) 1349 self._session, options, feed_dict, fetch_list, target_list, -> 1350 run_metadata) 1351
InternalError: Dst tensor is not initialized. [[Node: _arg_x_0_1/_5 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_456__arg_x_0_1", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]] [[Node: results/pixel_wise_softmax/truediv/_9 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_458_results/pixel_wise_softmax/truediv", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
During handling of the above exception, another exception occurred:
InternalError Traceback (most recent call last)