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;
|
||||
}
|
||||
|
||||
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) {
|
||||
for (const NodeDef& node : graph_def.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
|
||||
// than a text-format proto.
|
||||
string SummarizeGraphDef(const GraphDef& graph_def);
|
||||
string SummarizeGraphDef(gtl::ArraySlice<NodeDef> node_defs);
|
||||
|
||||
// Validates the syntax of a GraphDef provided externally.
|
||||
//
|
||||
|
@ -24,10 +24,16 @@ limitations under the License.
|
||||
|
||||
namespace tensorflow {
|
||||
|
||||
template <class NodeDefs>
|
||||
static bool EqualNodeDefsHelper(
|
||||
const NodeDefs& actual, const protobuf::RepeatedPtrField<NodeDef>& expected,
|
||||
string* diff, const EqualGraphDefOptions& options) {
|
||||
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 EqualRepeatedNodeDef(actual.node(), expected.node(), diff, options);
|
||||
}
|
||||
|
||||
bool EqualRepeatedNodeDef(const protobuf::RepeatedPtrField<NodeDef>& actual,
|
||||
const protobuf::RepeatedPtrField<NodeDef>& expected,
|
||||
string* diff, const EqualGraphDefOptions& options) {
|
||||
std::unordered_map<string, const NodeDef*> actual_index;
|
||||
for (const NodeDef& node : actual) {
|
||||
actual_index[node.name()] = &node;
|
||||
@ -62,24 +68,6 @@ static bool EqualNodeDefsHelper(
|
||||
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 {
|
||||
|
||||
string JoinStringField(const protobuf::RepeatedPtrField<string>& f) {
|
||||
|
@ -36,8 +36,6 @@ struct EqualGraphDefOptions {
|
||||
// nodes must be consistent.
|
||||
bool EqualGraphDef(const GraphDef& actual, const GraphDef& expected,
|
||||
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
|
||||
// attrs, internal attributes (if set in `options`), and control inputs.
|
||||
|
Loading…
Reference in New Issue
Block a user