aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar brett koonce <koonce@hello.com>2018-03-17 12:22:23 -0700
committerGravatar Shanqing Cai <cais@google.com>2018-03-17 15:22:23 -0400
commit705afa34fc4540593b6aa6dc6dd22ae02d41abea (patch)
tree15709ee714354257acf748f9580028beb8ccc9c5
parent6e20f3bdbdaf9bae2a67ee9cc9728963bc8b563f (diff)
contrib: minor spelling tweaks (#17788)
packages: model_pruning rnn solvers tensorrt
-rw-r--r--tensorflow/contrib/model_pruning/python/layers/layers.py2
-rw-r--r--tensorflow/contrib/model_pruning/python/pruning.py2
-rw-r--r--tensorflow/contrib/rnn/ops/gru_ops.cc2
-rw-r--r--tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py2
-rw-r--r--tensorflow/contrib/rnn/python/ops/rnn_cell.py4
-rw-r--r--tensorflow/contrib/solvers/python/ops/least_squares.py2
-rw-r--r--tensorflow/contrib/solvers/python/ops/linear_equations.py2
-rw-r--r--tensorflow/contrib/tensorrt/convert/convert_graph.h2
-rw-r--r--tensorflow/contrib/tensorrt/convert/convert_nodes.cc8
-rw-r--r--tensorflow/contrib/tensorrt/python/trt_convert.py2
-rw-r--r--tensorflow/contrib/tensorrt/resources/trt_int8_calibrator.cc2
-rw-r--r--tensorflow/contrib/tensorrt/test/test_tftrt.py2
12 files changed, 16 insertions, 16 deletions
diff --git a/tensorflow/contrib/model_pruning/python/layers/layers.py b/tensorflow/contrib/model_pruning/python/layers/layers.py
index 988748ad75..466daf204a 100644
--- a/tensorflow/contrib/model_pruning/python/layers/layers.py
+++ b/tensorflow/contrib/model_pruning/python/layers/layers.py
@@ -214,7 +214,7 @@ def masked_convolution(inputs,
elif data_format == 'NCHW':
df = 'channels_first'
else:
- raise ValueError('Unsupported data fromat', data_format)
+ raise ValueError('Unsupported data format', data_format)
layer = layer_class(
filters=num_outputs,
diff --git a/tensorflow/contrib/model_pruning/python/pruning.py b/tensorflow/contrib/model_pruning/python/pruning.py
index 86963be4b8..5146a4a2de 100644
--- a/tensorflow/contrib/model_pruning/python/pruning.py
+++ b/tensorflow/contrib/model_pruning/python/pruning.py
@@ -216,7 +216,7 @@ def _partitioned_variable_assign(partitioned_var, new_value):
"""Assign op for partitioned variables.
Args:
- partitioned_var: A partitioned tensotflow variable
+ partitioned_var: A partitioned tensorflow variable
new_value: Value to be assigned to the variable var
Returns:
diff --git a/tensorflow/contrib/rnn/ops/gru_ops.cc b/tensorflow/contrib/rnn/ops/gru_ops.cc
index e91d1e8a80..9c8e40851a 100644
--- a/tensorflow/contrib/rnn/ops/gru_ops.cc
+++ b/tensorflow/contrib/rnn/ops/gru_ops.cc
@@ -69,7 +69,7 @@ Element-wise dot product of a and b is represented by ab
Element-wise dot product is represented by \circ
Matrix multiplication is represented by *
-Baises are initialized with :
+Biases are initialized with :
`b_ru` - constant_initializer(1.0)
`b_c` - constant_initializer(0.0)
diff --git a/tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py b/tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py
index 7957edf68c..ffd2421894 100644
--- a/tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py
+++ b/tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py
@@ -54,7 +54,7 @@ def blocks_match(sess, use_peephole):
initializer = init_ops.random_uniform_initializer(-0.01, 0.01, seed=19890212)
with variable_scope.variable_scope("test", initializer=initializer):
- # magic naming so that the cells pick up these variables and resuse them
+ # magic naming so that the cells pick up these variables and reuse them
if use_peephole:
wci = variable_scope.get_variable(
"rnn/lstm_cell/w_i_diag", shape=[cell_size], dtype=dtypes.float32)
diff --git a/tensorflow/contrib/rnn/python/ops/rnn_cell.py b/tensorflow/contrib/rnn/python/ops/rnn_cell.py
index 358b2eb02b..2f6ae9f367 100644
--- a/tensorflow/contrib/rnn/python/ops/rnn_cell.py
+++ b/tensorflow/contrib/rnn/python/ops/rnn_cell.py
@@ -534,7 +534,7 @@ class GridLSTMCell(rnn_cell_impl.RNNCell):
initializer: (optional) The initializer to use for the weight and
projection matrices, default None.
num_unit_shards: (optional) int, default 1, How to split the weight
- matrix. If > 1,the weight matrix is stored across num_unit_shards.
+ matrix. If > 1, the weight matrix is stored across num_unit_shards.
forget_bias: (optional) float, default 1.0, The initial bias of the
forget gates, used to reduce the scale of forgetting at the beginning
of the training.
@@ -993,7 +993,7 @@ class BidirectionalGridLSTMCell(GridLSTMCell):
initializer: (optional) The initializer to use for the weight and
projection matrices, default None.
num_unit_shards: (optional) int, default 1, How to split the weight
- matrix. If > 1,the weight matrix is stored across num_unit_shards.
+ matrix. If > 1, the weight matrix is stored across num_unit_shards.
forget_bias: (optional) float, default 1.0, The initial bias of the
forget gates, used to reduce the scale of forgetting at the beginning
of the training.
diff --git a/tensorflow/contrib/solvers/python/ops/least_squares.py b/tensorflow/contrib/solvers/python/ops/least_squares.py
index fb7c0eb649..6e164f5342 100644
--- a/tensorflow/contrib/solvers/python/ops/least_squares.py
+++ b/tensorflow/contrib/solvers/python/ops/least_squares.py
@@ -33,7 +33,7 @@ def cgls(operator, rhs, tol=1e-6, max_iter=20, name="cgls"):
r"""Conjugate gradient least squares solver.
Solves a linear least squares problem \\(||A x - rhs||_2\\) for a single
- righ-hand side, using an iterative, matrix-free algorithm where the action of
+ right-hand side, using an iterative, matrix-free algorithm where the action of
the matrix A is represented by `operator`. The CGLS algorithm implicitly
applies the symmetric conjugate gradient algorithm to the normal equations
\\(A^* A x = A^* rhs\\). The iteration terminates when either
diff --git a/tensorflow/contrib/solvers/python/ops/linear_equations.py b/tensorflow/contrib/solvers/python/ops/linear_equations.py
index d791d46763..9305c6a11c 100644
--- a/tensorflow/contrib/solvers/python/ops/linear_equations.py
+++ b/tensorflow/contrib/solvers/python/ops/linear_equations.py
@@ -41,7 +41,7 @@ def conjugate_gradient(operator,
r"""Conjugate gradient solver.
Solves a linear system of equations `A*x = rhs` for selfadjoint, positive
- definite matrix `A` and righ-hand side vector `rhs`, using an iterative,
+ definite matrix `A` and right-hand side vector `rhs`, using an iterative,
matrix-free algorithm where the action of the matrix A is represented by
`operator`. The iteration terminates when either the number of iterations
exceeds `max_iter` or when the residual norm has been reduced to `tol`
diff --git a/tensorflow/contrib/tensorrt/convert/convert_graph.h b/tensorflow/contrib/tensorrt/convert/convert_graph.h
index e1596e89e2..e01e4a5328 100644
--- a/tensorflow/contrib/tensorrt/convert/convert_graph.h
+++ b/tensorflow/contrib/tensorrt/convert/convert_graph.h
@@ -35,7 +35,7 @@ tensorflow::Status ConvertCalibGraphToInferGraph(
// max_batch_size: maximum batch size which can be used for inference for
// optimization targets inference run with max batch size.
-// max_workspace_size_bytes: The upper bound of memory allowence for
+// max_workspace_size_bytes: The upper bound of memory allowance for
// engine building.
tensorflow::Status ConvertGraphDefToTensorRT(
const tensorflow::GraphDef& graph_def,
diff --git a/tensorflow/contrib/tensorrt/convert/convert_nodes.cc b/tensorflow/contrib/tensorrt/convert/convert_nodes.cc
index 75a3c3d034..92a692baa7 100644
--- a/tensorflow/contrib/tensorrt/convert/convert_nodes.cc
+++ b/tensorflow/contrib/tensorrt/convert/convert_nodes.cc
@@ -455,7 +455,7 @@ class Converter {
if (trt_tensors_.count(name)) {
inputs.push_back(trt_tensors_.at(name));
} else {
- LOG(FATAL) << "input: " << name << " not availabled for node at, "
+ LOG(FATAL) << "input: " << name << " not available for node at, "
<< node_def.name();
}
}
@@ -884,7 +884,7 @@ tensorflow::Status BinaryTensorOpWeight(
// default to element-wise
auto scale_mode = nvinfer1::ScaleMode::kELEMENTWISE;
- // TODO(jie): maybe use a permuatation instead to support more cases;
+ // TODO(jie): maybe use a permutation instead to support more cases;
bool permutation_flag = false;
if (weights.count() == 1) {
@@ -1498,7 +1498,7 @@ tensorflow::Status ConvertConst(Converter& ctx,
weights_tensor.int_val().begin(),
weights_tensor.int_val()
.end()); // make a local copy first to flatten
- // doesn't have to be contigous
+ // doesn't have to be contiguous
memcpy(dst, tensor_data.data(), len_tensor); // store into weight store
weights = TRT_ShapedWeights(dtype, dst, scalar_shape);
}
@@ -2212,7 +2212,7 @@ tensorflow::Status InjectCalibrationNode(tensorrt::convert::SubGraphParams& s) {
std::list<tensorflow::Node*> order;
for (tensorflow::Node* node : order_vec) {
if (s.subgraph_node_ids.count(node->id())) {
- order.push_front(node); // we want topological order to contstruct the
+ order.push_front(node); // we want topological order to construct the
// network layer by layer
}
}
diff --git a/tensorflow/contrib/tensorrt/python/trt_convert.py b/tensorflow/contrib/tensorrt/python/trt_convert.py
index 666220d78c..338475d90e 100644
--- a/tensorflow/contrib/tensorrt/python/trt_convert.py
+++ b/tensorflow/contrib/tensorrt/python/trt_convert.py
@@ -41,7 +41,7 @@ def create_inference_graph(input_graph_def,
max_workspace_size_bytes=2 << 20,
precision_mode="FP32",
minimum_segment_size=3):
- """Python wrapper for the TRT transormation.
+ """Python wrapper for the TRT transformation.
Args:
input_graph_def: GraphDef object containing a model to be transformed.
diff --git a/tensorflow/contrib/tensorrt/resources/trt_int8_calibrator.cc b/tensorflow/contrib/tensorrt/resources/trt_int8_calibrator.cc
index 74df75902e..dc7c93f869 100644
--- a/tensorflow/contrib/tensorrt/resources/trt_int8_calibrator.cc
+++ b/tensorflow/contrib/tensorrt/resources/trt_int8_calibrator.cc
@@ -61,7 +61,7 @@ bool TRTInt8Calibrator::setBatch(const std::unordered_map<string, void*>& data,
// TODO(aaroey): we should not use sync copy on default stream. Make sure
// stream->ThenMemcpy() is used in future PRs.
- // TODO(sami,aaroey): Need to figureout a way to ensure synchronization
+ // TODO(sami,aaroey): Need to figure out a way to ensure synchronization
// between stream, perhaps using a tensor?
auto status = cudaMemcpyAsync(d.first, it.second, d.second,
cudaMemcpyDeviceToDevice, stream);
diff --git a/tensorflow/contrib/tensorrt/test/test_tftrt.py b/tensorflow/contrib/tensorrt/test/test_tftrt.py
index 0b661bd536..ad01bedd8f 100644
--- a/tensorflow/contrib/tensorrt/test/test_tftrt.py
+++ b/tensorflow/contrib/tensorrt/test/test_tftrt.py
@@ -75,7 +75,7 @@ def run_graph(gdef, dumm_inp):
return val
-# Use real data that is representatitive of the inference dataset
+# Use real data that is representative of the inference dataset
# for calibration. For this test script it is random data.
def run_calibration(gdef, dumm_inp):
"""Run given calibration graph multiple times."""