shape_index is a tensor paramenter so it should be one of the inputs.
Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
{
VERBOSE(LIR) << "* Reshape" << std::endl;
VERBOSE(LIR) << " - Inputs : IFM(" << node.getInputs().at(0).value() << ") Shape("
- << node.param().shape_index << ")" << std::endl;
+ << node.getInputs().at(1).value() << ")" << std::endl;
VERBOSE(LIR) << " - Output : OFM(" << node.getOutputs().at(0).value() << ")" << std::endl;
}
// 1 -> A 1-D tensor of type ANEURALNETWORKS_TENSOR_INT32, defining the shape of the output
// tensor
- setInputs({init_param.inputs[0]});
+ setInputs({init_param.inputs[0], init_param.inputs[1]});
setOutputs({init_param.outputs[0]});
-
- _param.shape_index = init_param.inputs[1];
}
void Node::setInputs(const operand::IndexSet &indexes)
{
- assert(indexes.size() == 1);
+ assert(indexes.size() == 2);
graph::operation::Node::setInputs(indexes);
}
namespace Reshape
{
-struct Param
-{
- int32_t shape_index;
-};
-
class Node : public graph::operation::Node
{
public:
public:
virtual void setInputs(const operand::IndexSet &indexes) override;
virtual void setOutputs(const operand::IndexSet &indexes) override;
-
-public:
- const Param ¶m() const { return _param; }
-
-private:
- Param _param;
};
} // namespace Reshape