Core Module (radionets.core)#

Introduction#

radionets.core contains core modules, classes and functions for the deep-learning framework.

Submodules#

Reference/API#

radionets.core Package#

Functions#

define_learner(data, arch, train_conf[, ...])

get_bundles(path)

returns list of bundle paths located in a directory

get_dls(train_ds, valid_ds, batch_size, **kwargs)

get_learner(data, arch, lr[, loss_func, ...])

init_cnn(m[, uniform])

load_data(data_path, mode[, fourier])

Load data set from a directory and return it as H5DataSet.

load_pre_model(learn, pre_path[, visualize, ...])

Loads a previously saved model as pre-model.

open_bundle(path)

open radio galaxy bundles created in first analysis step

open_bundle_pack(path)

open_fft_bundle(path)

open radio galaxy bundles created in first analysis step

save_bundle(path, bundle, counter[, name])

save_fft_pair(path, x, y[, z, name_x, ...])

write fft_pairs created in second analysis step to h5 file

save_model(learn, model_path)

setup_logger([namespace, level])

Basic logging setup.

Classes#

AvgLossCallback()

Callback for tracking and plotting average training and validation losses.

CometCallback(name, validation_data, ...)

Callback for logging training metrics and visualizations to Comet ML.

CudaCallback(*[, after_create, before_fit, ...])

Callback to move model to CUDA device before training.

DataAug(*[, after_create, before_fit, ...])

Callback that applies data augmentation using random rotations.

DataBunch(train_dl, valid_dl[, num_classes])

GradientCallback(num_epochs, ...)

Callback for gradient and prediction tracking.

H5DataSet(bundle_paths, tar_fourier)

Normalize(conf)

Normalization callback for input and target data.

PredictionImageGradient(validation_data, ...)

Callback for computing spatial gradients of model predictions.

SaveTempCallback(model_path)

Callback for saving temporary model checkpoints during training.

SwitchLoss(second_loss, when_switch)

Callback for switching loss functions during training.