常用的TensorFlow高級API(持續更新)
API | 描述(作用) |
---|---|
tf.python_io.TFRecordWriter | 創建一個TFRecordWriter對象,這個對象就負責寫記錄到指定的文件中 |
tf.train.Example | 創建一個TFRecordWriter對象,這個對象就負責寫記錄到指定的文件中 |
tf.train.Features | Features對象 |
tf.train.Feature | Feature對象 |
tf.python_io.TFRecordWriter
- 初始化
- init(path,options=None)
- 參數:文件的路徑
- init(path,options=None)
- 常用函數:
- close()
- 關閉對象
- write(record)
- 寫入信息
- 參數:要寫入的記錄
- close()
tf.train.Example
- 初始化
- init(**kwargs)
- 常用函數:
- SerializeToString()
- 把example序列化爲一個字符串
- SerializeToString()
參考:
【1】https://blog.csdn.net/xierhacker/article/details/72357651