mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Automated Code Change
PiperOrigin-RevId: 826286610
This commit is contained in:
parent
db273660ba
commit
6d86cff5f3
|
|
@ -57,7 +57,7 @@ TEST(SimpleDeleteTest, TestSimpleDeleteModelSavedTwice) {
|
|||
MetaGraphDef* metagraph = saved_model_pb.mutable_meta_graphs(0);
|
||||
GraphDef* graph_def = metagraph->mutable_graph_def();
|
||||
SimpleDelete(*graph_def);
|
||||
uint64 hash1 = ComputeHash(*graph_def);
|
||||
uint64_t hash1 = ComputeHash(*graph_def);
|
||||
|
||||
const std::string export_dir2 =
|
||||
io::JoinPath(testing::TensorFlowSrcRoot(),
|
||||
|
|
@ -67,7 +67,7 @@ TEST(SimpleDeleteTest, TestSimpleDeleteModelSavedTwice) {
|
|||
const MetaGraphDef& metagraph2 = saved_model_pb2.meta_graphs(0);
|
||||
GraphDef graph_def2 = metagraph2.graph_def();
|
||||
SimpleDelete(graph_def2);
|
||||
uint64 hash2 = ComputeHash(graph_def2);
|
||||
uint64_t hash2 = ComputeHash(graph_def2);
|
||||
|
||||
EXPECT_EQ(hash1, hash2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ limitations under the License.
|
|||
|
||||
namespace tensorflow::graph_regularization {
|
||||
|
||||
uint64 ComputeHash(const GraphDef& graph_def) {
|
||||
uint64_t ComputeHash(const GraphDef& graph_def) {
|
||||
std::string graph_def_string;
|
||||
SerializeToStringDeterministic(graph_def, &graph_def_string);
|
||||
return tensorflow::Fingerprint64(graph_def_string);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ limitations under the License.
|
|||
namespace tensorflow::graph_regularization {
|
||||
|
||||
// Computes the Fingerprint64 hash of the GraphDef.
|
||||
uint64 ComputeHash(const GraphDef& graph_def);
|
||||
uint64_t ComputeHash(const GraphDef& graph_def);
|
||||
|
||||
// Returns the suffix UID of `function_name`, returns an error if there is none.
|
||||
absl::StatusOr<int64_t> GetSuffixUID(absl::string_view function_name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user