turicreate.config.set_num_gpus

turicreate.config.set_num_gpus(num_gpus)

Set the number of GPUs to use whenever applicable.

This can also be set by adding the following line to your ~/.turicreate/config file, e.g.:

` num_gpus: 1 `

Calling this function will override whatever you define in your config file.

Parameters:
num_gpus : int

Number of GPUs to use. To always use CPU, set to 0. To use all available GPUs, set to -1.

See also

get_num_gpus

Examples

>> turicreate.config.set_num_gpus(1)
>> turicreate.image_classifier.create(data, target='label')