Old ShapeInference Extensibility API

The new approach to shape inference suggests a creation of a custom nGraph operation that contains a special method for shape inference. The following classes and methods were deprecated:

However, the old approach with the InferenceEngine::IShapeInferExtension method still works for already existing custom layers. Custom Shape Inference functions are registered by calling InferenceEngine::ICNNNetwork::AddExtension with the implemented InferenceEngine::IShapeInferExtension method, which is a holder of custom implementations. The holder requires to implement two key methods:

Custom shape inference implementation is represented by the InferenceEngine::IShapeInferImpl::inferShapes method.

It is impossible to overwrite built-in shape inference functions. Custom type must be different from the supported ones.