torch_em.util
Helper functionality for loading checkpoints and image data, network prediction, model export and more.
1"""Helper functionality for loading checkpoints and image data, network prediction, model export and more. 2""" 3from .image import load_data, load_image, supports_memmap 4from .reporting import get_training_summary 5from .training import parser_helper 6from .util import ( 7 auto_compile, ensure_array, ensure_spatial_array, ensure_tensor, ensure_tensor_with_channels, 8 get_constructor_arguments, get_trainer, is_compiled, load_model, model_is_equal, ensure_patch_shape 9) 10 11# NOTE: we don't import the modelzoo convenience functions here. 12# In order to avoid importing bioimageio.core (which is quite massive) when importing torch_em 13# and to enable running torch_em without bioimageio.core 14# from .modelzoo import (add_weight_formats, 15# convert_to_onnx, 16# convert_to_torchscript, 17# export_bioimageio_model, 18# export_parser_helper, 19# get_default_citations, 20# import_bioimageio_model)