From 1311da2e89a8284623ae267a28b1c981b1bf41c7 Mon Sep 17 00:00:00 2001 From: Dmitry Volodin Date: Wed, 28 Oct 2020 23:10:33 +0300 Subject: [PATCH] fix typos in cc dir --- tensorflow/cc/experimental/base/public/tensor.h | 4 ++-- tensorflow/cc/gradients/nn_grad.cc | 2 +- .../cc/saved_model/experimental/public/saved_model_api.h | 2 +- tensorflow/cc/tools/freeze_saved_model_test.cc | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tensorflow/cc/experimental/base/public/tensor.h b/tensorflow/cc/experimental/base/public/tensor.h index fc447262ce1..7aab1ccef18 100644 --- a/tensorflow/cc/experimental/base/public/tensor.h +++ b/tensorflow/cc/experimental/base/public/tensor.h @@ -76,7 +76,7 @@ class Tensor { // unknown rank. int dims() const; - // Returns the number of elements in in demension `d`. + // Returns the number of elements in dimension `d`. // REQUIRES: `0 <= d < dims()` int64_t dim_size(int d) const; @@ -154,7 +154,7 @@ inline Tensor Tensor::FromBuffer(TF_DataType dtype, // 1. Only a function pointer is sent across the C API (&DeleterFunction) // 2. DeleterFunction is defined in the same build artifact that constructed // the std::function (so there isn't confusion about std::function ABI). - // Note that 2. is satisifed by the fact that this is a header-only API, where + // Note that 2. is satisfied by the fact that this is a header-only API, where // the function implementations are inline. DeleterStruct* deleter_struct = new DeleterStruct{deleter}; diff --git a/tensorflow/cc/gradients/nn_grad.cc b/tensorflow/cc/gradients/nn_grad.cc index d329b999a5c..86b659e7601 100644 --- a/tensorflow/cc/gradients/nn_grad.cc +++ b/tensorflow/cc/gradients/nn_grad.cc @@ -67,7 +67,7 @@ bool IsZero(const Scope& scope, const Output& grad) { // mat: A 2-D tensor of dimension [D0, D1] // // Returns: -// A tensor of dimension [D0, D1], the result fo vec * mat. +// A tensor of dimension [D0, D1], the result for vec * mat. Output BroadcastMul(const Scope& scope, const Output& vec, const Output& mat) { auto reshaped = ExpandDims(scope, vec, -1); return Multiply(scope, reshaped, mat); diff --git a/tensorflow/cc/saved_model/experimental/public/saved_model_api.h b/tensorflow/cc/saved_model/experimental/public/saved_model_api.h index c2bfb4dcf83..9925f99855d 100644 --- a/tensorflow/cc/saved_model/experimental/public/saved_model_api.h +++ b/tensorflow/cc/saved_model/experimental/public/saved_model_api.h @@ -84,7 +84,7 @@ class SavedModelAPI { SignatureDefFunction* GetSignatureDefFunction( const std::string& function_path, Status* status); - // Lists all Conrete Functions available from the SavedModel. + // Lists all Concrete Functions available from the SavedModel. std::vector ListFunctions(); // SavedModelAPI is movable, but not copyable. diff --git a/tensorflow/cc/tools/freeze_saved_model_test.cc b/tensorflow/cc/tools/freeze_saved_model_test.cc index 274a1630a05..d7f79c510bd 100644 --- a/tensorflow/cc/tools/freeze_saved_model_test.cc +++ b/tensorflow/cc/tools/freeze_saved_model_test.cc @@ -138,7 +138,7 @@ class FreezeTest : public ::testing::Test { } TF_ASSERT_OK(scope.ToGraphDef(&graph_def)); - // "c" isnt dependent on the variable, so nothing should be frozen. + // "c" isn't dependent on the variable, so nothing should be frozen. TF_ASSERT_OK(AddGraphDefWithOutputsToSavedModelBundle( graph_def, {"c:0"}, "assign", &saved_model_bundle)); @@ -183,7 +183,7 @@ class FreezeTest : public ::testing::Test { } Output c = ops::Mul(scope.WithOpName("c"), a, read_var); TF_ASSERT_OK(scope.ToGraphDef(&graph_def)); - // "c" isnt dependent on the variable, so nothing should be frozen. + // "c" isn't dependent on the variable, so nothing should be frozen. TF_ASSERT_OK(AddGraphDefWithOutputsToSavedModelBundle( graph_def, {"c:0"}, "assign", &saved_model_bundle)); @@ -244,7 +244,7 @@ class FreezeTest : public ::testing::Test { Output c = ops::Mul(scope.WithOpName("c"), a, read_var); TF_ASSERT_OK(scope.ToGraphDef(&graph_def)); - // "c" isnt dependent on the variable, so nothing should be frozen. + // "c" isn't dependent on the variable, so nothing should be frozen. TF_ASSERT_OK(AddGraphDefWithOutputsToSavedModelBundle( graph_def, {"c:0"}, "assign", &saved_model_bundle));