if len(args.data_exts) == 1: train_ext, = args.data_exts elif len(args.data_exts) == 2: train_ext, test_ext = args.data_exts elif len(args.data_exts) == 3: train_ext, valid_ext, test_ext = args.data_exts else: raise ValueError('Up to 3 data extenstions can be specified') n_folds = args.cv if args.cv is not None else 1 if n_folds > 1: fold_splits = load_cv_splits(args.dataset, dataset_name, n_folds, train_ext=train_ext, valid_ext=valid_ext, test_ext=test_ext, dtype=args.dtype) else: fold_splits = load_train_val_test_splits(args.dataset, dataset_name, x_only=False, y_only=False, train_ext=train_ext, valid_ext=valid_ext, test_ext=test_ext, dtype=args.dtype) print_fold_splits_shapes(fold_splits)
elif len(args.repr_exts) == 3: repr_train_y_ext, repr_valid_y_ext, repr_test_y_ext = args.repr_y_exts else: raise ValueError('Up to 3 repr data extenstions can be specified') n_folds = args.cv if args.cv is not None else 1 # # loading data and learned representations if args.cv is not None: fold_splits = load_cv_splits(args.dataset, dataset_name, n_folds, train_ext=train_ext, valid_ext=valid_ext, test_ext=test_ext, dtype=args.dtype) repr_fold_x_splits = load_cv_splits(args.repr_x, dataset_name, n_folds, x_only=True, train_ext=repr_train_x_ext, valid_ext=repr_valid_x_ext, test_ext=repr_test_x_ext, dtype=args.repr_x_dtype) if decode: repr_fold_y_splits = load_cv_splits(args.repr_y, dataset_name,