Categories
Misc

Problem with Tensorflow cast function and the GPU

I am trying to normalize a numpy array with tf.cast(array, tf.float32)/255.0.

When I run the script I am running into an error:

Traceback (most recent call last):

, line 91, in normalize

normalized = tf.cast(array, tf.float32) / 255.0

, line 153, in error_handler

raise e.with_traceback(filtered_tb) from None

site-packagestensorflowpythonframeworkops.py”, line 7186, in raise_from_not_ok_status

raise core._status_to_exception(e) from None # pylint: disable=protected-access

tensorflow.python.framework.errors_impl.ResourceExhaustedError: failed to allocate memory [Op:Cast]

submitted by /u/Successful-Ad-8021
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *