class InferenceEngine::BinaryConvolutionLayer

Overview

This class represents a standard binary convolution layer. More…

#include <ie_layers.h>

class BinaryConvolutionLayer: public InferenceEngine::WeightableLayer
{
public:
    // enums

    enum eBinaryConvolutionMode;

    // fields

    eBinaryConvolutionMode _mode = xnor_popcount;
    unsigned int _in_depth = 0u;
    float _pad_value = 0.0f;
    PropertyVector<unsigned int> _kernel;
    unsigned int& _kernel_x =  _kernel .at(X_AXIS);
    unsigned int& _kernel_y =  _kernel .at(Y_AXIS);
    PropertyVector<unsigned int> _padding;
    unsigned int& _padding_x =  _padding .at(X_AXIS);
    unsigned int& _padding_y =  _padding .at(Y_AXIS);
    PropertyVector<unsigned int> _pads_end;
    PropertyVector<unsigned int> _stride;
    unsigned int& _stride_x =  _stride .at(X_AXIS);
    unsigned int& _stride_y =  _stride .at(Y_AXIS);
    PropertyVector<unsigned int> _dilation;
    unsigned int& _dilation_x =  _dilation .at(X_AXIS);
    unsigned int& _dilation_y =  _dilation .at(Y_AXIS);
    unsigned int _out_depth = 0u;
    unsigned int _group = 1u;
    std::string _auto_pad;

    // construction

    BinaryConvolutionLayer(const LayerParams& p);
    BinaryConvolutionLayer(const BinaryConvolutionLayer& that);
    BinaryConvolutionLayer(BinaryConvolutionLayer&&);

    // methods

    BinaryConvolutionLayer& operator = (const BinaryConvolutionLayer& that);
};

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<CNNLayer> Ptr;

    // fields

    std::string name;
    std::string type;
    Precision precision;
    std::vector<DataPtr> outData;
    std::vector<DataWeakPtr> insData;
    Ptr _fusedWith;
    UserValue userValue;
    std::string affinity;
    std::map<std::string, std::string> params;
    std::map<std::string, Blob::Ptr> blobs;
    Blob::Ptr _weights;
    Blob::Ptr _biases;

    // methods

    std::shared_ptr<ngraph::Node> getNode() const;
    void fuse(Ptr& layer);
    virtual const DataPtr input() const;
    void parseParams();
    float GetParamAsFloat(const char \* param, float def) const;
    float GetParamAsFloat(const char \* param) const;
    std::vector<float> GetParamAsFloats(const char \* param, std::vector<float> def) const;
    std::vector<float> GetParamAsFloats(const char \* param) const;
    int GetParamAsInt(const char \* param, int def) const;
    int GetParamAsInt(const char \* param) const;
    std::vector<int> GetParamAsInts(const char \* param, std::vector<int> def) const;
    std::vector<int> GetParamAsInts(const char \* param) const;
    unsigned int GetParamAsUInt(const char \* param, unsigned int def) const;
    unsigned int GetParamAsUInt(const char \* param) const;
    size_t GetParamAsSizeT(const char \* param, size_t def) const;
    size_t GetParamAsSizeT(const char \* param) const;

    std::vector<unsigned int> GetParamAsUInts(
        const char \* param,
        std::vector<unsigned int> def
        ) const;

    std::vector<unsigned int> GetParamAsUInts(const char \* param) const;
    bool GetParamAsBool(const char \* param, bool def) const;
    bool GetParamAsBool(const char \* param) const;
    std::string GetParamAsString(const char \* param, const char \* def) const;
    bool CheckParamPresence(const char \* param) const;
    std::string GetParamAsString(const char \* param) const;
    std::string getBoolStrParamAsIntStr(const char \* param) const;

    std::vector<std::string> GetParamAsStrings(
        const char \* param,
        std::vector<std::string> def
        ) const;

    static float ie_parse_float(const std::string& str);
    static std::string ie_serialize_float(float value);
    CNNLayer(const LayerParams& prms);
    CNNLayer(const CNNLayer& other);

Detailed Documentation

This class represents a standard binary convolution layer.

Deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1

Fields

Mode of binary convolution operation.

unsigned int _in_depth = 0u

A number of input feature maps (size) generating the 3’rd input dimension.

float _pad_value = 0.0f

A pad value which is used to fill pad area.

PropertyVector<unsigned int> _kernel

A convolution kernel array [X, Y, Z, …].

PropertyVector<unsigned int> _padding

A convolution paddings begin array [X, Y, Z, …].

PropertyVector<unsigned int> _pads_end

A convolution paddings end array [X, Y, Z, …].

PropertyVector<unsigned int> _stride

A convolution strides array [X, Y, Z, …].

PropertyVector<unsigned int> _dilation

A convolution dilations array [X, Y, Z, …].

unsigned int _out_depth = 0u

A number of output feature maps (size) generating the 3’rd output dimension.

unsigned int _group = 1u

Number of groups.

std::string _auto_pad

Auto padding type.

Construction

BinaryConvolutionLayer(const LayerParams& p)

Creates a new BinaryConvolutionLayer instance.

BinaryConvolutionLayer(const BinaryConvolutionLayer& that)

copy constructor

BinaryConvolutionLayer(BinaryConvolutionLayer&&)

move constructor

Methods

BinaryConvolutionLayer& operator = (const BinaryConvolutionLayer& that)

assignment operator