Open diginori opened 5 years ago
1교시에서
import numpy as np import pandas as pd import tensorflow as tf from tensorflow import keras import numpy as np import matplotlib.pyplot as plt import time
x1 = np.arange(0, 10, 0.1) np.random.shuffle(x1) x2 = np.arange(0, 10, 0.1) np.random.shuffle(x2) x = np.ones((x1.shape[0],2)) x[:,0] = x1 x[:,1] = x2 np.random.shuffle(x) y = np.sum(x, axis=1) s = int(x.shape[0]*0.6) train_x, test_x = x[:s], x[s:] train_y, test_y = y[:s], y[s:]
1교시에서