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

Conversation

@fs-eire
Copy link
Contributor

@fs-eire fs-eire commented Sep 8, 2020

By accessing the graph ( already resolved and finalized ) in operator's initialization, it is possible to access the tensor value of the operator's input, if it's the graph's initializer or const value. This will enable implementation of upcoming operators that want to deal with constant inputs.

* @param opsets a list of opsets that exported from the model
* @param graph the completely initialized graph
*/
resolve(node: Graph.Node, opsets: ReadonlyArray<OpSet>, graph: Graph): Operator;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: not that different, but make graph as optional?


export interface Operator {
initialize(attributes: Attribute): void;
initialize(attributes: Attribute, node: Graph.Node, graph: Graph): void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. node and graph as optional?

@hanbitmyths hanbitmyths self-requested a review September 16, 2020 07:25
@hanbitmyths hanbitmyths self-assigned this Sep 16, 2020
@fs-eire fs-eire merged commit b69fb02 into master Nov 18, 2020
@fs-eire fs-eire deleted the allow-access-graph-op-init branch November 18, 2020 22:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants