def build_siamese(q: float, img_size: types_of_loco.input_img_size=28, channels: int=3, model_name: str='model1', optimizer=SGD(), loss_func=None, calc_distance=None, save_best_only=True, save_weights_only=False, save_base_filepath: str=None, is_inceptionv3: bool=False, decide_dataset_generator=None, nearest_data_ave_num=1, will_calc_real_data_train=False):
    use_distance = calc_distance
    if (use_distance is None):
        use_distance = (L1Norm() if callable(optimizer) else calc_l1_norm)

    def build(class_num: int):
        base_model = builder(class_num, img_size, channels, optimizer, model_name)
        shame_builder = SiameseBuilder(base_model)
        return shame_builder.build_shame_trainer_for_classifivation(q, optimizer, loss_func, use_distance, save_base_filepath, save_best_only, save_weights_only)
    print(type(decide_dataset_generator))
    return (pytorch_builder.PytorchSiameseModelBuilder(q, img_size, channels, model_name, optimizer, loss_func, use_distance, is_inceptionv3, decide_dataset_generator, nearest_data_ave_num, will_calc_real_data_train) if callable(optimizer) else build)
def build_siamese(q: float, img_size: types_of_loco.input_img_size=28, channels: int=3, model_name: str='model1', optimizer=SGD(), loss_func=None, calc_distance=None, save_best_only=True, save_weights_only=False, save_base_filepath: str=None, is_inceptionv3: bool=False, decide_dataset_generator=None, nearest_data_ave_num=1, will_calc_real_data_train=False):
    use_distance = calc_distance
    if (use_distance is None):
        use_distance = (L1Norm() if callable(optimizer) else calc_l1_norm)

    def build(class_num: int):
        base_model = builder(class_num, img_size, channels, optimizer, model_name)
        shame_builder = SiameseBuilder(base_model)
        return shame_builder.build_shame_trainer_for_classifivation(q, optimizer, loss_func, use_distance, save_base_filepath, save_best_only, save_weights_only)
    print(type(decide_dataset_generator))
    return (pytorch_builder.PytorchSiameseModelBuilder(q, img_size, channels, model_name, optimizer, loss_func, use_distance, is_inceptionv3, decide_dataset_generator, nearest_data_ave_num, will_calc_real_data_train) if callable(optimizer) else build)