Community
cancel
Showing results for 
Search instead for 
Did you mean: 
aag
Novice
99 Views

2020.2 deprecations

Hello,

I'm seeing 2020.2 had deprecated a number of APIs. While 

https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Extensibility_DG_CPU_Kernel.html

provides some guidance for layer implementation with the new API, I'm not finding a direct replacement to layer's parameters access, such as CNNLayer::GetParamAsFloat. What would be the API supposed to replace this?

In general, is there a guide somewhere on how to migrate a custom CNNLayer to the new API?

 

Thanks!

0 Kudos
1 Reply
Ilya_C_Intel
Employee
99 Views

Hi,

In 2020.2 release CNNLayer API was deprecated. It means that at the current moment you shouldn't use CNNLayer API.

Instead of CNNLayer please use nGraph API. We have a documentation which describes how you can create custom nGraph operation: https://docs.openvinotoolkit.org/latest/custom_operations.html

The nGraph API doesn't contain methods like CNNLayer::GetParamAsFloat because this API uses another philosophy. Each attribute of each operation has strong typing

If you want to get some attribute from operation in your custom kernel, you should:

  • Cast nGraph::Node to known operation
  • get attribute from this operation using a special class method.

Here is an example from documentation: https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Extensibility_DG_CPU_Kernel.html

--

Ilya

Reply