# Optimized GPU Memory

If you enable the Optimized GPU Memory option, the system preallocates GPU memory for tool optimization. Enable this option to improve the training Training is the process that your tool, which is a neural network, is learning about the features (pixels) based on the labels you made. For example, a tool will learn the defect/normal pixels in each image based on the defect/normal labels you drew. The goal of the tool Training is learning enough to give the correct inspection results of whether an unseen image is defective or not. The key to training is to ensure that you include all possible variations within your training set, and that your images are accurately labeled. Training times vary by the application, tool setup and the GPU in the PC being used to train the network. and processing speed of Legacy type tools when using Windows Display Driver Model (WDDM) drivers or Tesla Compute Cluster (TCC) drivers.

Disable this option when training Standard tools because it slows down their training speed. The option is disabled by default.

To enable this option from the VisionPro Deep Learning launch menu:

1. Select Options in the launch menu.

   For more information, see Launch VisionPro Deep Learning.

2. Check the Optimized GPU Memory checkbox.

3. Set the reserved memory depending on the application. The highest performance improvement is for applications that process small images.

You can also enable this option by selecting the Compute Devices option of the Help menu or using the API or command line arguments. For example:

- NET API: control.OptimizedGPUMemory(2.5*1024*1024*1024ul);

- C API: vidi_optimized_gpu_memory(2.5*1024*1024*1024);

Note: Do not enable Optimized GPU Memory when training multiple tools of Standard and Legacy type within a stream, because it causes significantly slower processing regardless of the number of GPUs you use.