Skip to content

Instantly share code, notes, and snippets.

@kevinrobinson
Last active December 8, 2015 23:27
Show Gist options
  • Select an option

  • Save kevinrobinson/075004170ddbd02999fa to your computer and use it in GitHub Desktop.

Select an option

Save kevinrobinson/075004170ddbd02999fa to your computer and use it in GitHub Desktop.
def _InitOpDefLibrary():
op_list = op_def_pb2.OpList()
text_format.Merge(op_list_ascii, op_list)
op_def_registry.register_op_list(op_list)
op_def_lib = op_def_library.OpDefLibrary()
op_def_lib.add_op_list(op_list)
return op_def_lib
_InitOpDefLibrary.op_list_ascii = """op {
op {
name: "Skipgram"
output_arg {
name: "vocab_word"
type: DT_STRING
}
output_arg {
name: "vocab_freq"
type: DT_INT32
}
...
}
"""
_op_def_lib = _InitOpDefLibrary()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment