Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::DecodeJSONExample
#include <parsing_ops.h>
Convert JSON-encoded Example records to binary protocol buffer strings.
Summary
Note: This is not a general purpose JSON parsing op.
This op converts JSON-serialized tf.train.Example
(created with json_format.MessageToJson
, following the standard JSON mapping) to a binary-serialized tf.train.Example
(equivalent to Example.SerializeToString()
) suitable for conversion to tensors with tf.io.parse_example
.
Args:
- scope: A Scope object
- json_examples: Each string is a JSON object serialized according to the JSON mapping of the Example proto.
Returns:
Output
: Each string is a binary Example protocol buffer corresponding to the respective element of json_examples
.
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::DecodeJSONExample Class Reference\n\ntensorflow::ops::DecodeJSONExample\n==================================\n\n`#include \u003cparsing_ops.h\u003e`\n\nConvert JSON-encoded Example records to binary protocol buffer strings.\n\nSummary\n-------\n\nNote: This is **not** a general purpose JSON parsing op.\n\nThis op converts JSON-serialized `tf.train.Example` (created with `json_format.MessageToJson`, following the [standard JSON mapping](https://developers.google.com/protocol-buffers/docs/proto3#json)) to a binary-serialized `tf.train.Example` (equivalent to `Example.SerializeToString()`) suitable for conversion to tensors with `tf.io.parse_example`.\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- json_examples: Each string is a JSON object serialized according to the JSON mapping of the Example proto.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): Each string is a binary Example protocol buffer corresponding to the respective element of `json_examples`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [DecodeJSONExample](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1a5175fd5db2a3e172a06516fec3850efc)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` json_examples)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [binary_examples](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1ac6b3c22f94a224fac5ebd77479234283) | `::`[tensorflow::Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1aa94b74db4f2eca6c04a386e5c8174a04) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1a92b8985bc289f541f6e6b6c22385977d)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1acc4b898745eafcad0baf530183ec33c8)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1afc1fcbf55494127f3107e7901ebec32a)`() const ` | |\n\nPublic attributes\n-----------------\n\n### binary_examples\n\n```scdoc\n::tensorflow::Output binary_examples\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### DecodeJSONExample\n\n```gdscript\n DecodeJSONExample(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input json_examples\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]