Created
September 15, 2018 13:49
-
-
Save securetorobert/37ab1bb443b8aa982b3416adb0b3d3e4 to your computer and use it in GitHub Desktop.
Make an input function from a Pandas DataFrame
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_input_fn(df, num_epochs): | |
return tf.estimator.inputs.pandas_input_fn( | |
x = df, | |
y = df['sentiment'], | |
batch_size = 128, | |
num_epochs = num_epochs, | |
shuffle = True, | |
queue_capacity = 1000, | |
num_threads = 1 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment