import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler import csv from pylab import* from sklearn import preprocessing from sklearn.preprocessing import MinMaxScaler from matplotlib import pyplot import math from random import random from sklearn.model_selection import KFold import random n_inputs = 6 #输入一行,一行有6个数据 max_time = 24 #一共24行 lstm_size = 35 #隐层单元 n_classes = 24 # 预测24个值 batch_size = 32 #每批次50个样本 n_batch = 32 // batch_size #计算一共有多少个批次 i=0 j=[] data = [] X = [] indicess = [] xback =24 with open(r'D:\晴天新.csv') as f: reader = csv.reader(f) for row in reader: if i == 0: i += 1
Python语言基于Tensorflow实现RNN(预测)
最新推荐文章于 2024-07-17 17:40:56 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)