forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pytorch_frontend' into ea/arange
- Loading branch information
Showing
10 changed files
with
308 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright (C) 2018-2022 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import pytest | ||
from pytorch_layer_test_class import PytorchLayerTest | ||
|
||
|
||
class TestCeil(PytorchLayerTest): | ||
def _prepare_input(self): | ||
import numpy as np | ||
return (np.random.randn(1, 3, 224, 224).astype(np.float32),) | ||
|
||
def create_model(self, inplace): | ||
import torch | ||
|
||
class aten_ceil(torch.nn.Module): | ||
def __init__(self, inplace): | ||
super(aten_ceil, self).__init__() | ||
self.op = torch.ceil_ if inplace else torch.ceil | ||
|
||
def forward(self, x): | ||
return x, self.op(x) | ||
|
||
ref_net = None | ||
|
||
return aten_ceil(inplace), ref_net, "aten::ceil" if not inplace else "aten::ceil_" | ||
|
||
@pytest.mark.parametrize("inplace", [False, True]) | ||
@pytest.mark.nightly | ||
def test_ceil(self, inplace, ie_device, precision, ir_version): | ||
self._test(*self.create_model(inplace), ie_device, precision, ir_version) |
Oops, something went wrong.