Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

How to import the expand into Gluon? #19567

Open
@xiaozhah

Description

@xiaozhah

Noted there are only these ONNX ops are included.

‘Abs’, ‘Acos’, ‘Add’, ‘And’, ‘ArgMax’, ‘ArgMin’, ‘Asin’, ‘Atan’, ‘AveragePool’, ‘BatchNormalization’, ‘Cast’, ‘Ceil’, ‘Clip’, ‘Concat’, ‘Constant’, ‘Conv’, ‘ConvTranspose’, ‘Cos’, ‘DepthToSpace’, ‘Div’, ‘Dropout’, ‘Elu’, ‘Equal’, ‘Exp’, ‘FC’, ‘Flatten’, ‘Floor’, ‘Gather’, ‘Gemm’, ‘GlobalAveragePool’, ‘GlobalLpPool’, ‘GlobalMaxPool’, ‘Greater’, ‘HardSigmoid’, ‘Hardmax’, ‘Identity’, ‘InstanceNormalization’, ‘LRN’, ‘LeakyRelu’, ‘Less’, ‘Log’, ‘LogSoftmax’, ‘LpNormalization’, ‘LpPool’, ‘MatMul’, ‘Max’, ‘MaxPool’, ‘MaxRoiPool’, ‘Mean’, ‘Min’, ‘Mul’, ‘Multinomial’, ‘Neg’, ‘Not’, ‘Or’, ‘PRelu’, ‘Pad’, ‘Pow’, ‘RandomNormal’, ‘RandomNormalLike’, ‘RandomUniform’, ‘RandomUniformLike’, ‘Reciprocal’, ‘ReduceL1’, ‘ReduceL2’, ‘ReduceLogSum’, ‘ReduceLogSumExp’, ‘ReduceMax’, ‘ReduceMean’, ‘ReduceMin’, ‘ReduceProd’, ‘ReduceSum’, ‘ReduceSumSquare’, ‘Relu’, ‘Reshape’, ‘Selu’, ‘Shape’, ‘Sigmoid’, ‘Sin’, ‘Size’, ‘Slice’, ‘Softmax’, ‘Softplus’, ‘Softsign’, ‘SpaceToDepth’, ‘SpatialBN’, ‘Split’, ‘Sqrt’, ‘Squeeze’, ‘Sub’, ‘Sum’, ‘Tan’, ‘Tanh’, ‘Transpose’, ‘Unsqueeze’, ‘Xor’

However I can't find the expand op, I think it releared to mx.nd.broadcast.to.

This is vis of ONNX format from Pytorch code:A.expand(A.size(0), A.size(1),B.size(2)), maybe in Gluon is mx.nd.broadcast.to(A, shape=(0,0,B.size(2))),but broadcast is not exists in ops.
image

How to import the expand into Gluon?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions