Git Product home page Git Product logo

Comments (1)

tracyn-arm avatar tracyn-arm commented on May 27, 2024

The Gather operator in the Compute Library used by Arm NN will build the output shape in a specific way:

The docs for arm_compute::misc::shape_calculator::compute_gather_shape() are:

	/** Calculate the gather output shape of a tensor
	 *
	 * @param[in] input_shape   Input tensor shape
	 * @param[in] indices_shape Indices tensor shape. Only supports for 2d and 3d indices
	 * @param[in] actual_axis   Axis to be used in the computation
	 *
	 * @note Let input_shape be (X,Y,Z) and indices shape (W,O,P) and axis 1
	 *       the new shape is computed by replacing the axis in the input shape with
	 *       the indice shape so the output shape will be (X,W,O,P,Z)
	 *
	 * @return the calculated shape
	 */

In the failing case provided, we have:

	 * @note Let input_shape be [1,40,20,4] and indices shape [1] and axis 3
	 *       the new shape is computed by replacing the axis in the input shape with
	 *       the indice shape so the output shape will be [1,40,20,1]

This results in the generated error where: [1,40,20] != [1,40,20,1] as Arm NN is conforming to the requirements of the library it uses and failing on the output tensor shape that was set in the model.

from armnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.