Advertisement
Guest User

Untitled

a guest
May 24th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # Import
  2. import tensorflow as tf
  3. import numpy as np
  4. import pandas as pd
  5. from sklearn.preprocessing import MinMaxScaler
  6. import matplotlib.pyplot as plt
  7.  
  8.  
  9.  
  10.  
  11. record_iterator = tf.python_io.tf_record_iterator(path="csv.tfrecord")
  12. print ("ok")
  13. print (record_iterator)
  14. for string_record in record_iterator:
  15. print ("ok")
  16. example = tf.train.Example()
  17. example.ParseFromString(string_record)
  18.  
  19. labels = example.features.feature['label'].float_list.value
  20.  
  21.  
  22. features = example.features.feature['features'].float_list.value
  23.  
  24.  
  25. print (labels)
  26. print (features)
  27. print ("end")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement