Remove unused overloads of SummarizeGraphDef and EqualGraphDef
PiperOrigin-RevId: 157843404
This commit is contained in:
parent
a56d59a84b
commit
f661128dbf
@ -39,14 +39,6 @@ string SummarizeGraphDef(const GraphDef& graph_def) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
string SummarizeGraphDef(gtl::ArraySlice<NodeDef> node_defs) {
|
|
||||||
string ret;
|
|
||||||
for (const NodeDef& node : node_defs) {
|
|
||||||
strings::StrAppend(&ret, SummarizeNodeDef(node), ";\n");
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status ValidateExternalGraphDefSyntax(const GraphDef& graph_def) {
|
Status ValidateExternalGraphDefSyntax(const GraphDef& graph_def) {
|
||||||
for (const NodeDef& node : graph_def.node()) {
|
for (const NodeDef& node : graph_def.node()) {
|
||||||
TF_RETURN_IF_ERROR(ValidateExternalNodeDefSyntax(node));
|
TF_RETURN_IF_ERROR(ValidateExternalNodeDefSyntax(node));
|
||||||
|
@ -27,7 +27,6 @@ namespace tensorflow {
|
|||||||
// Produce a human-readable version of a GraphDef that is more concise
|
// Produce a human-readable version of a GraphDef that is more concise
|
||||||
// than a text-format proto.
|
// than a text-format proto.
|
||||||
string SummarizeGraphDef(const GraphDef& graph_def);
|
string SummarizeGraphDef(const GraphDef& graph_def);
|
||||||
string SummarizeGraphDef(gtl::ArraySlice<NodeDef> node_defs);
|
|
||||||
|
|
||||||
// Validates the syntax of a GraphDef provided externally.
|
// Validates the syntax of a GraphDef provided externally.
|
||||||
//
|
//
|
||||||
|
@ -24,9 +24,15 @@ limitations under the License.
|
|||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
|
||||||
template <class NodeDefs>
|
bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected,
|
||||||
static bool EqualNodeDefsHelper(
|
string* diff, const EqualGraphDefOptions& options) {
|
||||||
const NodeDefs& actual, const protobuf::RepeatedPtrField<NodeDef>& expected,
|
// Intentionally do not check that versions match so that this routine can
|
||||||
|
// be used for less brittle golden file tests.
|
||||||
|
return EqualRepeatedNodeDef(actual.node(), expected.node(), diff, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EqualRepeatedNodeDef(const protobuf::RepeatedPtrField<NodeDef>& actual,
|
||||||
|
const protobuf::RepeatedPtrField<NodeDef>& expected,
|
||||||
string* diff, const EqualGraphDefOptions& options) {
|
string* diff, const EqualGraphDefOptions& options) {
|
||||||
std::unordered_map<string, const NodeDef*> actual_index;
|
std::unordered_map<string, const NodeDef*> actual_index;
|
||||||
for (const NodeDef& node : actual) {
|
for (const NodeDef& node : actual) {
|
||||||
@ -62,24 +68,6 @@ static bool EqualNodeDefsHelper(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected,
|
|
||||||
string* diff, const EqualGraphDefOptions& options) {
|
|
||||||
// Intentionally do not check that versions match so that this routine can
|
|
||||||
// be used for less brittle golden file tests.
|
|
||||||
return EqualNodeDefsHelper(actual.node(), expected.node(), diff, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EqualGraphDef(gtl::ArraySlice<NodeDef> actual, const GraphDef& expected,
|
|
||||||
string* diff, const EqualGraphDefOptions& options) {
|
|
||||||
return EqualNodeDefsHelper(actual, expected.node(), diff, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EqualRepeatedNodeDef(const protobuf::RepeatedPtrField<NodeDef>& actual,
|
|
||||||
const protobuf::RepeatedPtrField<NodeDef>& expected,
|
|
||||||
string* diff, const EqualGraphDefOptions& options) {
|
|
||||||
return EqualNodeDefsHelper(actual, expected, diff, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
string JoinStringField(const protobuf::RepeatedPtrField<string>& f) {
|
string JoinStringField(const protobuf::RepeatedPtrField<string>& f) {
|
||||||
|
@ -36,8 +36,6 @@ struct EqualGraphDefOptions {
|
|||||||
// nodes must be consistent.
|
// nodes must be consistent.
|
||||||
bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected,
|
bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected,
|
||||||
string* diff, const EqualGraphDefOptions& options = {});
|
string* diff, const EqualGraphDefOptions& options = {});
|
||||||
bool EqualGraphDef(gtl::ArraySlice<NodeDef> actual, const GraphDef& expected,
|
|
||||||
string* diff, const EqualGraphDefOptions& options = {});
|
|
||||||
|
|
||||||
// Determines if actual and expected are equal, ignoring: ordering of
|
// Determines if actual and expected are equal, ignoring: ordering of
|
||||||
// attrs, internal attributes (if set in `options`), and control inputs.
|
// attrs, internal attributes (if set in `options`), and control inputs.
|
||||||
|
Loading…
Reference in New Issue
Block a user