---
description: Explore Ultralytics-tailored torch utility features like Model EMA, early stopping, smart inference, image scaling, get_flops, and many more.
keywords: Ultralytics, Torch Utils, Model EMA, Early Stopping, Smart Inference, Get CPU Info, Time Sync, Fuse Deconv and bn, Get num params, Get FLOPs, Scale img, Copy attr, Intersect dicts, De_parallel, Init seeds, Profile
---
## ModelEMA
---
### ::: ultralytics.utils.torch_utils.ModelEMA
< br > < br >
## EarlyStopping
---
### ::: ultralytics.utils.torch_utils.EarlyStopping
< br > < br >
## torch_distributed_zero_first
---
### ::: ultralytics.utils.torch_utils.torch_distributed_zero_first
< br > < br >
## smart_inference_mode
---
### ::: ultralytics.utils.torch_utils.smart_inference_mode
< br > < br >
## get_cpu_info
---
### ::: ultralytics.utils.torch_utils.get_cpu_info
< br > < br >
## select_device
---
### ::: ultralytics.utils.torch_utils.select_device
< br > < br >
## time_sync
---
### ::: ultralytics.utils.torch_utils.time_sync
< br > < br >
## fuse_conv_and_bn
---
### ::: ultralytics.utils.torch_utils.fuse_conv_and_bn
< br > < br >
## fuse_deconv_and_bn
---
### ::: ultralytics.utils.torch_utils.fuse_deconv_and_bn
< br > < br >
## model_info
---
### ::: ultralytics.utils.torch_utils.model_info
< br > < br >
## get_num_params
---
### ::: ultralytics.utils.torch_utils.get_num_params
< br > < br >
## get_num_gradients
---
### ::: ultralytics.utils.torch_utils.get_num_gradients
< br > < br >
## model_info_for_loggers
---
### ::: ultralytics.utils.torch_utils.model_info_for_loggers
< br > < br >
## get_flops
---
### ::: ultralytics.utils.torch_utils.get_flops
< br > < br >
## get_flops_with_torch_profiler
---
### ::: ultralytics.utils.torch_utils.get_flops_with_torch_profiler
< br > < br >
## initialize_weights
---
### ::: ultralytics.utils.torch_utils.initialize_weights
< br > < br >
## scale_img
---
### ::: ultralytics.utils.torch_utils.scale_img
< br > < br >
## make_divisible
---
### ::: ultralytics.utils.torch_utils.make_divisible
< br > < br >
## copy_attr
---
### ::: ultralytics.utils.torch_utils.copy_attr
< br > < br >
## get_latest_opset
---
### ::: ultralytics.utils.torch_utils.get_latest_opset
< br > < br >
## intersect_dicts
---
### ::: ultralytics.utils.torch_utils.intersect_dicts
< br > < br >
## is_parallel
---
### ::: ultralytics.utils.torch_utils.is_parallel
< br > < br >
## de_parallel
---
### ::: ultralytics.utils.torch_utils.de_parallel
< br > < br >
## one_cycle
---
### ::: ultralytics.utils.torch_utils.one_cycle
< br > < br >
## init_seeds
---
### ::: ultralytics.utils.torch_utils.init_seeds
< br > < br >
## strip_optimizer
---
### ::: ultralytics.utils.torch_utils.strip_optimizer
< br > < br >
## profile
---
### ::: ultralytics.utils.torch_utils.profile
< br > < br >