pyoe.OEBench.ADBench package

Subpackages

Submodules

pyoe.OEBench.ADBench.data_generator module

pyoe.OEBench.ADBench.myutils module

class pyoe.OEBench.ADBench.myutils.Utils

Bases: object

cal_loss(y, y_pred, mode='devnet')
data_description(X, y)
get_device(gpu_specific=False)
grad_norm(grad_tuple)
metric(y_true, y_score, pos_label=1)
plot_grad_flow(named_parameters)
result_process(result_show, name, std=False)
sampler(X_train, y_train, batch_size)
sampler_2(X_train, y_train, step, batch_size=512)
sampler_pairs(X_train_tensor, y_train, epoch, batch_num, batch_size, s_a_a, s_a_u, s_u_u)

X_train_tensor: the input X in the torch.tensor form y_train: label in the numpy.array form

batch_num: generate how many batches in one epoch batch_size: the batch size

set_seed(seed)
torch_cdf_loss(tensor_a, tensor_b, p=1)
unique(a, b)

pyoe.OEBench.ADBench.run module

Module contents