Jetson Nano running out of memory: ResourceExhaustedError: OOM when allocating tensor with shape[3,3,512,1024

Hi,

For TensorFlow v2.x, please try the following:

device = tf.config.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(device[0], True)
tf.config.experimental.set_virtual_device_configuration(device[0], [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=1024)])

Thanks.

1 Like