Error when creating MaxPool

assertion when trying to create a maxpool node, I have created a mock backend and tried this in the transformPostLowering() function

mnist: /home/bucky/Desktop/compiler/glow/lib/Graph/NodeValue.cpp:10: glow::NodeValue::NodeValue(qsnn::Node *): Assertion `(!N || (N->getNumResults() == 1)) && "Constructing a value for a multi-res node"' failed.
Aborted (core dumped)

How can I over come this?

MaxPool has two outputs, Result and Argmax. For multi-output nodes you need to select a specific output when using it, for example maxPoolNode->getResult() or maxPoolNode->getArgmax(), instead of just using maxPoolNode as an input to another node.

1 Like