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

@autosize does not work with semi-colon separated kwargs #2086

Closed
Saransh-cpp opened this issue Oct 16, 2022 · 0 comments · Fixed by #2087
Closed

@autosize does not work with semi-colon separated kwargs #2086

Saransh-cpp opened this issue Oct 16, 2022 · 0 comments · Fixed by #2087
Labels

Comments

@Saransh-cpp
Copy link
Member

Package Version

master branch

Julia Version

1.8.2

OS / Environment

Software:

System Software Overview:

  System Version: macOS 12.6 (21G115)
  Kernel Version: Darwin 21.6.0

Hardware:

Hardware Overview:

  Model Name: MacBook Air
  Chip: Apple M1

Describe the bug

The @autosize macro throws an error (which looks unrelated to Flux) if the keyword arguments are separated by a semi-colon. The macro works if I run the same code, but with the semi-colon removed.

Steps to Reproduce

@autosize (3, 1) Chain(; c = Dense(_ => 2, sigmoid), b = BatchNorm(_, affine=false))

Expected Results

I expected this to work like it does without the semi-colon -

julia> @autosize (3, 1) Chain(c = Dense(_ => 2, sigmoid), b = BatchNorm(_, affine=false))
Chain(
  c = Dense(3 => 2, σ),                 # 8 parameters
  b = BatchNorm(2, affine=false),
)

Observed Results

ERROR: syntax: all-underscore identifier used as rvalue around /Users/saransh/Code/julia-dev/FluxML/Flux.jl/src/outputsize.jl:256
Stacktrace:
 [1] top-level scope
   @ REPL[5]:1
 [2] top-level scope
   @ ~/.julia/packages/CUDA/DfvRa/src/initialization.jl:52

Relevant log output

No response

mcabbott added a commit that referenced this issue Oct 16, 2022
* fix 2086

* Embedding, but not yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant