Skip to content

Commit

Permalink
Fixed typo in length (openvinotoolkit#5611)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov authored May 13, 2021
1 parent 39fde54 commit 07a4918
Show file tree
Hide file tree
Showing 39 changed files with 122 additions and 122 deletions.
2 changes: 1 addition & 1 deletion docs/ops/movement/VariadicSplit_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Where D is the rank of input tensor `data`. The sum of elements in `split_length
* **2**: `axis`. Axis along `data` to split. A scalar of type `T2` with value from range `-rank(data) .. rank(data)-1`. Negative values address dimensions from the end.
**Required.**

* **3**: `split_lengths`. A list containing the dimension values of each output tensor shape along the split `axis`. A 1D tensor of type `T2`. The number of elements in `split_lengths` determines the number of outputs. The sum of elements in `split_lengths` must match `data.shape[axis]`. In addition `split_lenghts` can contain a single `-1` element, which means, all remaining items along specified `axis` that are not consumed by other parts. **Required.**
* **3**: `split_lengths`. A list containing the dimension values of each output tensor shape along the split `axis`. A 1D tensor of type `T2`. The number of elements in `split_lengths` determines the number of outputs. The sum of elements in `split_lengths` must match `data.shape[axis]`. In addition `split_lengths` can contain a single `-1` element, which means, all remaining items along specified `axis` that are not consumed by other parts. **Required.**

**Outputs**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class INFERENCE_ENGINE_API_CLASS(LSTMSequenceIE) : public ngraph::op::util::RNNC
LSTMSequenceIE(const Output <Node> &X,
const Output <Node> &H_t,
const Output <Node> &C_t,
const Output <Node> &seq_lenghts,
const Output <Node> &seq_lengths,
const Output <Node> &WR,
const Output <Node> &B,
size_t hidden_size,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NGRAPH_RTTI_DEFINITION(op::GRUSequenceIE, "GRUSequenceIE", 4);

op::GRUSequenceIE::GRUSequenceIE(const Output<Node>& X,
const Output<Node>& H_t,
const Output<Node>& seq_lenghts,
const Output<Node>& seq_lengths,
const Output<Node>& WR,
const Output<Node>& B,
std::size_t hidden_size,
Expand All @@ -27,7 +27,7 @@ op::GRUSequenceIE::GRUSequenceIE(const Output<Node>& X,
float clip,
bool linear_before_reset,
int64_t seq_axis)
: RNNCellBase({X, H_t, seq_lenghts, WR, B}, hidden_size, clip, activations, activations_alpha, activations_beta),
: RNNCellBase({X, H_t, seq_lengths, WR, B}, hidden_size, clip, activations, activations_alpha, activations_beta),
m_direction(direction),
m_linear_before_reset(linear_before_reset),
m_seq_axis(seq_axis) {
Expand All @@ -50,7 +50,7 @@ void op::GRUSequenceIE::validate_and_infer_types() {
auto b_pshape = get_input_partial_shape(4);
std::vector<ngraph::PartialShape> pshapes = {x_pshape, h_state_pshape, seq_lengths_pshape, wr_pshape, b_pshape};

std::vector<std::string> in_names = {"X", "H", "seq_lenghts", "WR", "B"};
std::vector<std::string> in_names = {"X", "H", "seq_lengths", "WR", "B"};
// num_direction dimension should be squeezed, we don't support bidirectional case
std::vector<size_t> ranks = {3, 2, 1, 2, 1};
for (size_t i = 0; i < pshapes.size(); ++i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ NGRAPH_RTTI_DEFINITION(op::LSTMSequenceIE, "LSTMSequenceIE", 5);
op::LSTMSequenceIE::LSTMSequenceIE(const Output<Node> &X,
const Output<Node> &H_t,
const Output<Node> &C_t,
const Output<Node> &seq_lenghts,
const Output<Node> &seq_lengths,
const Output<Node> &WR,
const Output<Node> &B,
std::size_t hidden_size,
Expand All @@ -27,7 +27,7 @@ op::LSTMSequenceIE::LSTMSequenceIE(const Output<Node> &X,
const std::vector<float> &activations_beta,
float clip,
int64_t seq_axis)
: RNNCellBase({X, H_t, C_t, seq_lenghts, WR, B}, hidden_size, clip, activations, activations_alpha, activations_beta),
: RNNCellBase({X, H_t, C_t, seq_lengths, WR, B}, hidden_size, clip, activations, activations_alpha, activations_beta),
m_direction(direction),
m_seq_axis(seq_axis) {
constructor_validate_and_infer_types();
Expand All @@ -52,7 +52,7 @@ void op::LSTMSequenceIE::validate_and_infer_types() {

std::vector<ngraph::PartialShape> pshapes = {x_pshape, h_state_pshape, c_state_pshape,
seq_lengths_pshape, wr_pshape, b_pshape};
std::vector<std::string> in_names = {"X", "H", "C", "seq_lenghts", "WR", "B"};
std::vector<std::string> in_names = {"X", "H", "C", "seq_lengths", "WR", "B"};
// num_direction dimension should be squeezed, we don't support bidirectional case
std::vector<size_t> ranks = {3, 2, 2, 1, 2, 1};
for (size_t i = 0; i < pshapes.size(); ++i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void op::RNNSequenceIE::validate_and_infer_types() {
auto b_pshape = get_input_partial_shape(4);

std::vector<ngraph::PartialShape> pshapes = {x_pshape, h_state_pshape, seq_lengths_pshape, wr_pshape, b_pshape};
std::vector<std::string> in_names = {"X", "H", "seq_lenghts", "WR", "B"};
std::vector<std::string> in_names = {"X", "H", "seq_lengths", "WR", "B"};
// num_direction dimension should be squeezed, we don't support bidirectional case
std::vector<size_t> ranks = {3, 2, 1, 2, 1};
for (size_t i = 0; i < pshapes.size(); ++i) {
Expand Down
4 changes: 2 additions & 2 deletions inference-engine/src/vpu/myriad_plugin/myriad_metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ std::vector<std::string> MyriadMetrics::AvailableDevicesNames(

std::string MyriadMetrics::FullName(std::string deviceName) const {
std::string nameDelimiter("-ma");
unsigned int indexLenght = 4;
unsigned int indexLength = 4;
unsigned int placeOfTypeId = 2;

auto indexStr = deviceName;
indexStr.erase(0, indexStr.find(nameDelimiter) + nameDelimiter.length());

if (indexLenght != indexStr.length()) {
if (indexLength != indexStr.length()) {
return deviceName;
} else {
auto myriadId = std::string(1, indexStr[placeOfTypeId]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ TEST(ONNX_Reader_Tests, ImportModelWithExternalDataFromStringException) {

EXPECT_PRED_FORMAT2(
testing::IsSubstring,
std::string("data/tensor.data, offset: 0, data_lenght: 0, sha1_digest: 0)"),
std::string("data/tensor.data, offset: 0, data_length: 0, sha1_digest: 0)"),
e.what());
}
catch(...) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ TEST(TransformationTests, LSTMSequenceConversionTest) {
ngraph::Shape{batch_size, num_directions, hidden_size});
const auto C_t = std::make_shared<ngraph::opset5::Parameter>(ngraph::element::f32,
ngraph::Shape{batch_size, num_directions, hidden_size});
const auto seq_lenghts = std::make_shared<ngraph::opset5::Constant>(ngraph::element::f32,
const auto seq_lengths = std::make_shared<ngraph::opset5::Constant>(ngraph::element::f32,
ngraph::Shape{batch_size});
const auto B = std::make_shared<ngraph::opset5::Constant>(ngraph::element::f32,
ngraph::Shape{num_directions,
Expand All @@ -245,7 +245,7 @@ TEST(TransformationTests, LSTMSequenceConversionTest) {
auto sequence_ie = std::make_shared<ngraph::op::LSTMSequenceIE>(X,
in_1,
in_2,
seq_lenghts,
seq_lengths,
in_3,
in_4,
sequence->get_hidden_size(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace {
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_PARAM,
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_CONST,
ngraph::helpers::SequenceTestsMode::PURE_SEQ};
// output values increase rapidly without clip, so use only seq_lenghts = 2
// output values increase rapidly without clip, so use only seq_lengths = 2
std::vector<size_t> seq_lengths_zero_clip{2};
std::vector<size_t> seq_lengths_clip_non_zero{20};
std::vector<size_t> batch{10};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using namespace LayerTestsDefinitions;

namespace {
// without clip values increase rapidly, so use only seq_lenghts = 2
// without clip values increase rapidly, so use only seq_lengths = 2
std::vector<bool> execute_first_iteration{true};
std::vector<bool> is_body_condition_const{true/*, false*/};
std::vector<bool> body_condition{true/*, false*/}; // works only if is_body_condition_const == true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace {
ngraph::helpers::SequenceTestsMode::PURE_SEQ,
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_CONST,
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_PARAM};
// output values increase rapidly without clip, so use only seq_lenghts = 2
// output values increase rapidly without clip, so use only seq_lengths = 2
std::vector<size_t> seq_lengths_zero_clip{2};
std::vector<size_t> seq_lengths_clip_non_zero{20};
std::vector<size_t> batch{10};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace {
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_PARAM,
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_CONST,
ngraph::helpers::SequenceTestsMode::PURE_SEQ};
// output values increase rapidly without clip, so use only seq_lenghts = 2
// output values increase rapidly without clip, so use only seq_lengths = 2
std::vector<size_t> seq_lengths_zero_clip{2};
std::vector<size_t> seq_lengths_clip_non_zero{20};
std::vector<size_t> batch{1, 10};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using namespace LayerTestsDefinitions;

namespace {
std::vector<bool> should_decompose = {true, false};
// output values increase rapidly without clip, so use only seq_lenghts = 2
// output values increase rapidly without clip, so use only seq_lengths = 2
std::vector<size_t> seq_lengths_zero_clip{2};
std::vector<size_t> seq_lengths_clip_non_zero{20};
std::vector<size_t> batch{1, 10};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class GRUSequenceCPUTest : public testing::WithParamInterface<GRUSequenceCpuSpec
CPUSpecificParams cpuParams;
std::map<std::string, std::string> additionalConfig;

size_t seq_lenghts;
size_t seq_lengths;
size_t batch;
size_t hidden_size;
size_t input_size = 10;
Expand All @@ -60,11 +60,11 @@ class GRUSequenceCPUTest : public testing::WithParamInterface<GRUSequenceCpuSpec

std::tie(basicParamsSet, cpuParams, additionalConfig) = this->GetParam();
std::tie(inFmts, outFmts, priority, selectedType) = cpuParams;
std::tie(m_mode, seq_lenghts, batch, hidden_size, activations, clip, linear_before_reset, direction, netPrecision, targetDevice) = basicParamsSet;
std::tie(m_mode, seq_lengths, batch, hidden_size, activations, clip, linear_before_reset, direction, netPrecision, targetDevice) = basicParamsSet;

size_t num_directions = direction == ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL ? 2 : 1;
std::vector<std::vector<size_t>> inputShapes = {
{{batch, seq_lenghts, input_size},
{{batch, seq_lengths, input_size},
{batch, num_directions, hidden_size},
{batch},
{num_directions, 3 * hidden_size, input_size},
Expand All @@ -89,7 +89,7 @@ class GRUSequenceCPUTest : public testing::WithParamInterface<GRUSequenceCpuSpec
selectedType += "_";
selectedType += outPrc.name();

m_max_seq_len = seq_lenghts;
m_max_seq_len = seq_lengths;
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(Precision::FP32);
auto params = ngraph::builder::makeParams(ngPrc, {inputShapes[0], inputShapes[1]});
if (m_mode == ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_MAX_SEQ_LEN_PARAM
Expand Down Expand Up @@ -174,7 +174,7 @@ CPUSpecificParams cpuParams{{ntc, ntc}, {tnc, ntc}, {"ref_any"}, "ref_any"};
CPUSpecificParams cpuParamsBatchSizeOne{{ntc, ntc}, {tnc, ntc}, {"ref_any"}, "ref_any"};;

std::vector<ngraph::helpers::SequenceTestsMode> mode{ngraph::helpers::SequenceTestsMode::PURE_SEQ};
// output values increase rapidly without clip, so use only seq_lenghts = 2
// output values increase rapidly without clip, so use only seq_lengths = 2
std::vector<size_t> seq_lengths_zero_clip{2};
std::vector<size_t> batch{10};
std::vector<size_t> batch_size_one{1};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class LSTMSequenceCPUTest : public testing::WithParamInterface<LSTMSequenceCpuSp
CPUSpecificParams cpuParams;
std::map<std::string, std::string> additionalConfig;

size_t seq_lenghts;
size_t seq_lengths;
size_t batch;
size_t hidden_size;
size_t input_size;
Expand All @@ -60,12 +60,12 @@ class LSTMSequenceCPUTest : public testing::WithParamInterface<LSTMSequenceCpuSp

std::tie(basicParamsSet, cpuParams, additionalConfig) = this->GetParam();
std::tie(inFmts, outFmts, priority, selectedType) = cpuParams;
std::tie(m_mode, seq_lenghts, batch, hidden_size, input_size, activations, clip, direction, netPrecision, targetDevice) = basicParamsSet;
std::tie(m_mode, seq_lengths, batch, hidden_size, input_size, activations, clip, direction, netPrecision, targetDevice) = basicParamsSet;

size_t num_directions = direction == ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL ? 2 : 1;
m_max_seq_len = seq_lenghts;
m_max_seq_len = seq_lengths;
std::vector<std::vector<size_t>> inputShapes = {
{{batch, seq_lenghts, input_size},
{{batch, seq_lengths, input_size},
{batch, num_directions, hidden_size},
{batch, num_directions, hidden_size},
{batch},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RNNSequenceCPUTest : public testing::WithParamInterface<RNNSequenceCpuSpec
CPUSpecificParams cpuParams;
std::map<std::string, std::string> additionalConfig;

size_t seq_lenghts;
size_t seq_lengths;
size_t batch;
size_t hidden_size;
size_t input_size;
Expand All @@ -59,11 +59,11 @@ class RNNSequenceCPUTest : public testing::WithParamInterface<RNNSequenceCpuSpec

std::tie(basicParamsSet, cpuParams, additionalConfig) = this->GetParam();
std::tie(inFmts, outFmts, priority, selectedType) = cpuParams;
std::tie(m_mode, seq_lenghts, batch, hidden_size, input_size, activations, clip, direction, netPrecision, targetDevice) = basicParamsSet;
std::tie(m_mode, seq_lengths, batch, hidden_size, input_size, activations, clip, direction, netPrecision, targetDevice) = basicParamsSet;

size_t num_directions = direction == ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL ? 2 : 1;
std::vector<std::vector<size_t>> inputShapes = {
{{batch, seq_lenghts, input_size},
{{batch, seq_lengths, input_size},
{batch, num_directions, hidden_size},
{batch},
{num_directions, hidden_size, input_size},
Expand All @@ -82,7 +82,7 @@ class RNNSequenceCPUTest : public testing::WithParamInterface<RNNSequenceCpuSpec
selectedType += "_";
selectedType += outPrc.name();

m_max_seq_len = seq_lenghts;
m_max_seq_len = seq_lengths;
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(Precision::FP32);
auto params = ngraph::builder::makeParams(ngPrc, {inputShapes[0], inputShapes[1]});
if (m_mode == ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_MAX_SEQ_LEN_PARAM
Expand Down Expand Up @@ -152,7 +152,7 @@ CPUSpecificParams cpuParams{{ntc, ntc}, {tnc, ntc}, {"ref_any"}, "ref_any"};
CPUSpecificParams cpuParamsBatchSizeOne{{ntc, ntc}, {tnc, ntc}, {"ref_any"}, "ref_any"};

std::vector<ngraph::helpers::SequenceTestsMode> mode{ngraph::helpers::SequenceTestsMode::PURE_SEQ};
// output values increase rapidly without clip, so use only seq_lenghts = 2
// output values increase rapidly without clip, so use only seq_lengths = 2
std::vector<size_t> seq_lengths_zero_clip{2};
std::vector<size_t> batch{10};
std::vector<size_t> batch_size_one{1};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace {
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_CONST,
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_PARAM,
ngraph::helpers::SequenceTestsMode::PURE_SEQ};
// output values increase rapidly without clip, so use only seq_lenghts = 2
// output values increase rapidly without clip, so use only seq_lengths = 2
std::vector<size_t> seq_lengths_zero_clip{2};
std::vector<size_t> seq_lengths_clip_non_zero{20};
std::vector<size_t> batch{10};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ std::vector<ngraph::helpers::SequenceTestsMode> mode{ngraph::helpers::SequenceTe
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_CONST,
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_PARAM,
ngraph::helpers::SequenceTestsMode::PURE_SEQ};
// output values increase rapidly without clip, so use only seq_lenghts = 2
// output values increase rapidly without clip, so use only seq_lengths = 2
std::vector<size_t> seq_lengths_zero_clip{2};
std::vector<size_t> seq_lengths_clip_non_zero{20};
std::vector<size_t> batch{10};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ std::vector<ngraph::helpers::SequenceTestsMode> mode{ngraph::helpers::SequenceTe
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_CONST,
ngraph::helpers::SequenceTestsMode::PURE_SEQ_RAND_SEQ_LEN_PARAM,
ngraph::helpers::SequenceTestsMode::PURE_SEQ};
// output values increase rapidly without clip, so use only seq_lenghts = 2
// output values increase rapidly without clip, so use only seq_lengths = 2
std::vector<size_t> seq_lengths_zero_clip{2};
std::vector<size_t> seq_lengths_clip_non_zero{20};
std::vector<size_t> batch{1, 10};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace LayerTestsDefinitions {

typedef std::tuple<
std::vector<size_t>, // Logits shapes
std::vector<int>, // logits lenght
std::vector<int>, // logits length
std::vector<std::vector<int>>, // labels
std::vector<int>, // labels length
int, // blank index
Expand Down
Loading

0 comments on commit 07a4918

Please sign in to comment.