#!/usr/bin/env python
# -*- coding: utf-8 -*-
# time: 2024/3/11 13:45
# file: test.py
# author: David
# company: shenyang JY
import os
import pickle
import numpy as np
shuffle = False
valid_rate = 0.1
datax = [x for x in range(1, 101)]
datay = [x for x in range(1, 101)]
shuffle_index = np.random.permutation(len(datax))
indexs = shuffle_index if shuffle else np.arange(0, len(datax))
valid_size = int(len(datax)*valid_rate)
valid_index = indexs[-valid_size:]
train_index = indexs[:-valid_size]
tx, ty = datax[train_index], datay[train_index]
vx, vy = datax[valid_index], datay[valid_index]