Created
December 11, 2016 01:44
-
-
Save yaroslavvb/08227f38f2fc3a92b32a7a0a6927500b to your computer and use it in GitHub Desktop.
count number of ops in TensorFlow low-level API
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
from google.protobuf import text_format | |
from tensorflow.core.framework import op_def_pb2 | |
ops = op_def_pb2.OpList() | |
ops_text = open("/local_home/yaroslav/tensorflow.git/tensorflow/tensorflow/core/ops/ops.pbtxt").read() | |
text_format.Merge(ops_text, ops) | |
print(len(ops.op)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment