Skip to content

Instantly share code, notes, and snippets.

View zhaozhentao's full-sized avatar
🏠
Working from home

zhaozhentao

🏠
Working from home
View GitHub Profile
# This file is useful for reading the contents of the ops generated by ruby.
# You can read any graph defination in pb/pbtxt format generated by ruby
# or by python and then convert it back and forth from human readable to binary format.
import tensorflow as tf
from google.protobuf import text_format
from tensorflow.python.platform import gfile
def pbtxt_to_graphdef(filename):
with open(filename, 'r') as f: