[PyOV] Add get_byte_size to const node (#20759)
This commit is contained in:
parent
c21fd2ea61
commit
5b583276b2
@ -127,6 +127,8 @@ void regclass_graph_op_Constant(py::module m) {
|
|||||||
|
|
||||||
constant.def("get_value_strings", &ov::op::v0::Constant::get_value_strings);
|
constant.def("get_value_strings", &ov::op::v0::Constant::get_value_strings);
|
||||||
|
|
||||||
|
constant.def("get_byte_size", &ov::op::v0::Constant::get_byte_size);
|
||||||
|
|
||||||
constant.def("get_vector", [](const ov::op::v0::Constant& self) {
|
constant.def("get_vector", [](const ov::op::v0::Constant& self) {
|
||||||
auto element_type = self.get_element_type();
|
auto element_type = self.get_element_type();
|
||||||
if (element_type == ov::element::boolean) {
|
if (element_type == ov::element::boolean) {
|
||||||
|
@ -128,6 +128,7 @@ def test_constant(const, args, expectation):
|
|||||||
assert node.get_output_size() == 1
|
assert node.get_output_size() == 1
|
||||||
assert list(node.get_output_shape(0)) == [3, 3]
|
assert list(node.get_output_shape(0)) == [3, 3]
|
||||||
assert node.get_output_element_type(0) == Type.f32
|
assert node.get_output_element_type(0) == Type.f32
|
||||||
|
assert node.get_byte_size() == 36
|
||||||
|
|
||||||
|
|
||||||
def test_concat():
|
def test_concat():
|
||||||
|
Loading…
Reference in New Issue
Block a user