# turicreate.config.set_num_gpus¶

turicreate.config.set_num_gpus(num_gpus)

Set the number of GPUs to use whenever applicable. Currently TuriCreate supports using all CPUs or one GPU.

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 To always use CPUs, set to 0. To use a GPU, set to 1.

Examples

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