【NCNN源码分析】3.基本数据结构分析

版权声明:转载请注明出处 http://blog.csdn.net/TwT520Ly https://blog.csdn.net/TwT520Ly/article/details/82897799

对于NCNN,在网络层传递的过程中,进行数据流动的方式是通过自定义的blob实现的,对于blob通过生产者编号和消费者编号进行定义,producer表示输出该blob的网络层编号,consumers表示以该blob作为输入的网络层编号,前者只能是一个制造者,后者可以是多个使用者。

class Blob
{
public:
    // empty
    Blob();

public:
#if NCNN_STRING
    // blob name
    std::string name;
#endif // NCNN_STRING
    // layer index which produce this blob as output
    int producer;
    // layer index which need this blob as input
    std::vector<int> consumers;
};

猜你喜欢

转载自blog.csdn.net/TwT520Ly/article/details/82897799