fix typos in cc dir
This commit is contained in:
parent
018ad69342
commit
1311da2e89
@ -76,7 +76,7 @@ class Tensor {
|
|||||||
// unknown rank.
|
// unknown rank.
|
||||||
int dims() const;
|
int dims() const;
|
||||||
|
|
||||||
// Returns the number of elements in in demension `d`.
|
// Returns the number of elements in dimension `d`.
|
||||||
// REQUIRES: `0 <= d < dims()`
|
// REQUIRES: `0 <= d < dims()`
|
||||||
int64_t dim_size(int d) const;
|
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)
|
// 1. Only a function pointer is sent across the C API (&DeleterFunction)
|
||||||
// 2. DeleterFunction is defined in the same build artifact that constructed
|
// 2. DeleterFunction is defined in the same build artifact that constructed
|
||||||
// the std::function (so there isn't confusion about std::function ABI).
|
// 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.
|
// the function implementations are inline.
|
||||||
|
|
||||||
DeleterStruct* deleter_struct = new DeleterStruct{deleter};
|
DeleterStruct* deleter_struct = new DeleterStruct{deleter};
|
||||||
|
@ -67,7 +67,7 @@ bool IsZero(const Scope& scope, const Output& grad) {
|
|||||||
// mat: A 2-D tensor of dimension [D0, D1]
|
// mat: A 2-D tensor of dimension [D0, D1]
|
||||||
//
|
//
|
||||||
// Returns:
|
// 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) {
|
Output BroadcastMul(const Scope& scope, const Output& vec, const Output& mat) {
|
||||||
auto reshaped = ExpandDims(scope, vec, -1);
|
auto reshaped = ExpandDims(scope, vec, -1);
|
||||||
return Multiply(scope, reshaped, mat);
|
return Multiply(scope, reshaped, mat);
|
||||||
|
@ -84,7 +84,7 @@ class SavedModelAPI {
|
|||||||
SignatureDefFunction* GetSignatureDefFunction(
|
SignatureDefFunction* GetSignatureDefFunction(
|
||||||
const std::string& function_path, Status* status);
|
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<ConcreteFunction*> ListFunctions();
|
std::vector<ConcreteFunction*> ListFunctions();
|
||||||
|
|
||||||
// SavedModelAPI is movable, but not copyable.
|
// SavedModelAPI is movable, but not copyable.
|
||||||
|
@ -138,7 +138,7 @@ class FreezeTest : public ::testing::Test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TF_ASSERT_OK(scope.ToGraphDef(&graph_def));
|
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(
|
TF_ASSERT_OK(AddGraphDefWithOutputsToSavedModelBundle(
|
||||||
graph_def, {"c:0"}, "assign", &saved_model_bundle));
|
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);
|
Output c = ops::Mul(scope.WithOpName("c"), a, read_var);
|
||||||
TF_ASSERT_OK(scope.ToGraphDef(&graph_def));
|
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(
|
TF_ASSERT_OK(AddGraphDefWithOutputsToSavedModelBundle(
|
||||||
graph_def, {"c:0"}, "assign", &saved_model_bundle));
|
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);
|
Output c = ops::Mul(scope.WithOpName("c"), a, read_var);
|
||||||
TF_ASSERT_OK(scope.ToGraphDef(&graph_def));
|
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(
|
TF_ASSERT_OK(AddGraphDefWithOutputsToSavedModelBundle(
|
||||||
graph_def, {"c:0"}, "assign", &saved_model_bundle));
|
graph_def, {"c:0"}, "assign", &saved_model_bundle));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user