Skip to content

Commit

Permalink
Apply codestyle (openvinotoolkit#107)
Browse files Browse the repository at this point in the history
* Apply codestyle

* Remove commented line
  • Loading branch information
mvafin authored Jan 16, 2023
1 parent 7c3c8fe commit 1330219
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/frontends/pytorch/src/frontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ ov::frontend::InputModel::Ptr FrontEnd::load_impl(const std::vector<ov::Any>& va
auto decoder = variants[0].as<std::shared_ptr<IDecoder>>();
auto tdecoder = std::dynamic_pointer_cast<TorchDecoder>(decoder);
FRONT_END_GENERAL_CHECK(tdecoder, "Couldn't cast");
//auto tdecoder = variants[0].as<std::shared_ptr<TorchDecoder>>();
return std::make_shared<pytorch::InputModel>(tdecoder);
}

Expand Down
2 changes: 1 addition & 1 deletion src/frontends/pytorch/src/op/nms.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2018-2022 Intel Corporation
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

Expand Down
2 changes: 1 addition & 1 deletion src/frontends/pytorch/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ OutputVector convert_node(NodeContext* context) {
/// conversion.
/// \return fully converted OV Model
std::shared_ptr<ov::Model> convert_pytorch_model2(std::shared_ptr<TorchDecoder> pytorch_model,
const TensorMap& external_tensor_map) {
const TensorMap& external_tensor_map) {
std::shared_ptr<ov::Model> resulting_model; // define here to make a conversion in a nested scope
{
ParameterVector parameters;
Expand Down
2 changes: 1 addition & 1 deletion src/frontends/pytorch/src/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ov::element::Type convert_dtype(NodeContext& context, size_t input_id);
std::shared_ptr<Node> concat_list_construct(std::shared_ptr<Node> input);

std::shared_ptr<ov::Model> convert_pytorch_model2(std::shared_ptr<TorchDecoder> pytorch_model,
const TensorMap& external_tensor_map = {});
const TensorMap& external_tensor_map = {});

OutputVector convert_node(NodeContext* context);

Expand Down
3 changes: 2 additions & 1 deletion tests/layer_tests/pytorch_tests/test_batch_norm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2018-2022 Intel Corporation
# Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import pytest
Expand Down Expand Up @@ -42,6 +42,7 @@ def forward(self, x):
{"ndim": 5}
])
@pytest.mark.nightly
@pytest.mark.precommit
def test_batch_norm(self, weights, bias, eps, ie_device, precision, ir_version, kwargs_to_prepare_input):
self._test(*self.create_model(weights, bias, eps),
ie_device, precision, ir_version, kwargs_to_prepare_input=kwargs_to_prepare_input, dynamic_shapes=False)
3 changes: 2 additions & 1 deletion tests/layer_tests/pytorch_tests/test_nms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2018-2022 Intel Corporation
# Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import pytest
Expand Down Expand Up @@ -33,6 +33,7 @@ def forward(self, boxes, scores):
return torchvision_nms(), ref_net, "torchvision::nms"

@pytest.mark.nightly
@pytest.mark.precommit
def test_nms(self, ie_device, precision, ir_version, boxes_num):
self.boxes_num = boxes_num
self._test(*self.create_model(), ie_device, precision, ir_version)
1 change: 1 addition & 0 deletions tests/layer_tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
requests>=2.25.1
numpy>=1.19.2
torch
torchvision
pytest

0 comments on commit 1330219

Please sign in to comment.