def __init__(self, image=None, label=None, path=None, bigdl_type="float"): image_tensor = JTensor.from_ndarray( image) if image is not None else None label_tensor = JTensor.from_ndarray( label) if label is not None else None self.bigdl_type = bigdl_type self.value = callBigDlFunc(bigdl_type, JavaValue.jvm_class_constructor(self), image_tensor, label_tensor, path)
def __init__(self, jvalue, bigdl_type, *args): if (jvalue): assert (type(jvalue) == JavaObject) self.value = jvalue else: self.value = callBigDlFunc(bigdl_type, JavaValue.jvm_class_constructor(self), *args) self.bigdl_type = bigdl_type
def __init__(self, image_list=None, label_list=None, jvalue=None, bigdl_type="float"): assert jvalue or image_list, "jvalue and image_list cannot be None in the same time" if jvalue: self.value = jvalue else: # init from image ndarray list and label rdd(optional) image_tensor_list = map(lambda image: JTensor.from_ndarray(image), image_list) label_tensor_list = map(lambda label: JTensor.from_ndarray(label), label_list) if label_list else None self.value = callBigDlFunc(bigdl_type, JavaValue.jvm_class_constructor(self), image_tensor_list, label_tensor_list) self.bigdl_type = bigdl_type
def __init__(self, jvalue, bigdl_type, *args): self.value = jvalue if jvalue else callBigDlFunc( bigdl_type, JavaValue.jvm_class_constructor(self), *args) self.bigdl_type = bigdl_type
def __init__(self, bigdl_type="float", *args): self.value = callBigDlFunc(bigdl_type, JavaValue.jvm_class_constructor(self), *args)