Skip to content

use var name to get variable instead of index #2980

@jacquesqiao

Description

@jacquesqiao

Now in Operator or Kernel's Run/Infershape function, we may use index such as Input(0)/Ouptput(1) to get variable from scope, there are several problem of use index:

  1. We have to remember what the meaning of each index is. In OpProto, we declare the variable name and the name have it's meaning, such as "weight" "bias". Index do not have meaning and is hard to remember.
  2. For variant input/output, we do not know the real index of the variable we want. It's hard to get what we want with index.

so we should use name declared in OpProto to get var from scope.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions