-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata.py
31 lines (22 loc) · 802 Bytes
/
data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
This file reads the data and generates new training and test examples.
"""
import tensorflow as tf
print("Reading data...")
##################################################
# READ YOUR DATA AND CREATE TRAIN AND TEST SPLIT #
##################################################
###################################################
# REPLACE WITH YOUR TRAIN AND TEST DATA GENERATOR #
###################################################
# Tip: You can also combine both generators using a parameters.
# Then, however, you have to wrap the dataset generation into a lambda.
input_shapes = (1, 1)
input_types = (tf.float32, tf.float32)
output_shapes = ()
def training_generator():
for i in range(100):
yield i, i+1
def test_generator():
for i in range(100):
yield i, i+1