Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust][Relay] nn.dense: is units a required parameter? #6836

Closed
gussmith23 opened this issue Nov 3, 2020 · 1 comment
Closed

[Rust][Relay] nn.dense: is units a required parameter? #6836

gussmith23 opened this issue Nov 3, 2020 · 1 comment

Comments

@gussmith23
Copy link
Contributor

When parsing the following Relay expression:

#[version = "0.0.5"]
def @main(%data: Tensor[(16, 32), float32], %weights: Tensor[(64, 32), float32]) -> Tensor[(16, 64), float32] {
  nn.dense(%data, %weights)/* ty=Tensor[(16, 64), float32] */
}

I get:

thread 'language::from_relay::tests::dense' panicked at 'AttributeError: relay.attrs.DenseAttrs: Cannot find required field 'units' during initialization.If the key is defined check that its type matches the declared type.

Adding units=64 fixes the problem. However, the docs indicate that units is optional...at least in the Python frontend. Maybe units isn't optional in the text format?

(this is a new error -- I used to get the error detailed in #6470 when parsing nn.dense)

@gussmith23 gussmith23 changed the title [Rust][Bug] nn.dense: is units a required parameter? [Rust][Relay] nn.dense: is units a required parameter? Nov 3, 2020
@masahi
Copy link
Member

masahi commented Jan 9, 2022

Let's continue at #7003

@masahi masahi closed this as completed Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants