def __init__(self, decay_step, decay_rate, stair_case=False, bigdl_type="float"): JavaValue.__init__(self, None, bigdl_type, decay_step, decay_rate, stair_case)
def __init__(self, X, Y, model, criterion, end_trigger, batch_size, optim_method=None, cores=None, bigdl_type="float"): if not optim_method: optim_methods = {model.name(): SGD()} elif isinstance(optim_method, OptimMethod): optim_methods = {model.name(): optim_method} elif isinstance(optim_method, JavaObject): optim_methods = { model.name(): OptimMethod(optim_method, bigdl_type) } else: optim_methods = optim_method if cores is None: cores = multiprocessing.cpu_count() JavaValue.__init__(self, None, bigdl_type, [JTensor.from_ndarray(X) for X in to_list(X)], JTensor.from_ndarray(Y), model.value, criterion, optim_methods, end_trigger, batch_size, cores)
def __init__(self, upper=None, lower=None, bigdl_type="float"): if upper is not None and lower is not None: upper = upper + 0.0 lower = lower + 0.0 JavaValue.__init__(self, None, bigdl_type, upper, lower) else: JavaValue.__init__(self, None, bigdl_type)
def __init__(self, min, bigdl_type="float"): """ Create a MinLoss trigger. :param min: min loss """ JavaValue.__init__(self, None, bigdl_type, min)
def __init__(self, max, bigdl_type="float"): """ Create a MaxScore trigger. :param max: max score """ JavaValue.__init__(self, None, bigdl_type, max)
def __init__(self, interval, bigdl_type="float"): """ Create a SeveralIteration trigger. :param interval: interval is the "n" where an action is triggeredevery "n" iterations """ JavaValue.__init__(self, None, bigdl_type, interval)
def __init__(self, max_epoch, bigdl_type="float"): """ Create a MaxEpoch trigger. :param max_epoch: max_epoch """ JavaValue.__init__(self, None, bigdl_type, max_epoch)
def __init__(self, max, bigdl_type="float"): """ Create a MaxIteration trigger. :param max: max """ JavaValue.__init__(self, None, bigdl_type, max)
def __init__(self, k=10, neg_num=100, bigdl_type="float"): """ Create NDCG validation method. :param k: top k :param neg_num: number of negative items. """ JavaValue.__init__(self, None, bigdl_type, k, neg_num)
def __init__(self, first, *other): """ Create a Or trigger. :param first: first Trigger :param other: other Trigger """ JavaValue.__init__(self, None, "float", first, list(other))
def __init__(self, log_dir, app_name, bigdl_type="float"): """ Create a TrainSummary. Logs will be saved to log_dir/app_name/train. :param log_dir: the root dir to store the logs :param app_name: the application name """ JavaValue.__init__(self, None, bigdl_type, log_dir, app_name)
def __init__(self, monitor, factor=0.1, patience=10, mode="min", epsilon=1e-4, cooldown=0, min_lr=0.0, bigdl_type="float"): JavaValue.__init__(self, None, bigdl_type, monitor, factor, patience, mode, epsilon, cooldown, min_lr)
def __init__(self, log_dir, app_name, bigdl_type="float"): """ Create a ValidationSummary. Logs will be saved to log_dir/app_name/train. By default, all ValidationMethod set into optimizer will be recorded and the recording interval is the same as trigger of ValidationMethod in the optimizer. :param log_dir: the root dir to store the logs :param app_name: the application name """ JavaValue.__init__(self, None, bigdl_type, log_dir, app_name)
def __init__(self, classes, iou=0.5, use_voc2007=False, skip_class=-1, bigdl_type="float"): """ :param classes: the number of classes :param iou: the IOU threshold :param use_voc2007: use validation method before voc2010 (i.e. voc2007) :param skip_class: skip calculation on a specific class (e.g. background) """ JavaValue.__init__(self, None, bigdl_type, classes, iou, use_voc2007, skip_class)
def __init__(self, model, training_rdd, criterion, end_trigger, batch_size, optim_method=None, bigdl_type="float"): """ Create an optimizer. :param model: the neural net model :param training_data: the training dataset :param criterion: the loss function :param optim_method: the algorithm to use for optimization, e.g. SGD, Adagrad, etc. If optim_method is None, the default algorithm is SGD. :param end_trigger: when to end the optimization :param batch_size: training batch size """ if not optim_method: optim_methods = {model.name(): SGD()} elif isinstance(optim_method, OptimMethod): optim_methods = {model.name(): optim_method} elif isinstance(optim_method, JavaObject): optim_methods = { model.name(): OptimMethod(optim_method, bigdl_type) } else: optim_methods = optim_method if isinstance(training_rdd, RDD): JavaValue.__init__(self, None, bigdl_type, model.value, training_rdd, criterion, optim_methods, end_trigger, batch_size) elif isinstance(training_rdd, DataSet): self.bigdl_type = bigdl_type self.value = callBigDlFunc(self.bigdl_type, "createDistriOptimizerFromDataSet", model.value, training_rdd, criterion, optim_methods, end_trigger, batch_size)
def __init__(self, varianceNormAverage=True, bigdl_type="float"): JavaValue.__init__(self, None, bigdl_type, varianceNormAverage)
def __init__(self, bigdl_type="float"): JavaValue.__init__(self, None, bigdl_type)
def __init__(self, value, bigdl_type="float"): value = value + 0.0 JavaValue.__init__(self, None, bigdl_type, value)
def __init__(self, mean, stdv, bigdl_type="float"): mean = mean + 0.0 stdv = stdv + 0.0 JavaValue.__init__(self, None, bigdl_type, mean, stdv)
def __init__(self, bigdl_type="float"): """ Create a EveryEpoch trigger. """ JavaValue.__init__(self, None, bigdl_type)
def __init__(self, metric_name, idx, count_idx): self.name = metric_name self.idx = idx self.count_idx = count_idx JavaValue.__init__(self, None, "float", metric_name, idx, count_idx)
def __init__(self, val_method, name, output_indices, label_indices): self.name = name self.val_method = val_method JavaValue.__init__(self, None, "float", val_method, name, output_indices, label_indices)
def __init__(self, k, classes, bigdl_type="float"): JavaValue.__init__(self, None, bigdl_type, k, classes)
def __init__(self, step_sizes, gamma, bigdl_type="float"): JavaValue.__init__(self, None, bigdl_type, step_sizes, gamma)
def __init__(self, iteration_per_epoch, bigdl_type="float"): JavaValue.__init__(self, None, bigdl_type, iteration_per_epoch)
def __init__(self, cri=None, bigdl_type="float"): from bigdl.dllib.nn.criterion import ClassNLLCriterion if cri is None: cri = ClassNLLCriterion() JavaValue.__init__(self, None, bigdl_type, cri)
def __init__(self, power, max_iteration, bigdl_type="float"): JavaValue.__init__(self, None, bigdl_type, power, max_iteration)