losttech / Gradient

This repository serves as a public issue tracker and documentation host for Gradient, full TensorFlow binding for .NET
Other
86 stars 4 forks source link

Allow passing anonymous objects for keyword args #12

Closed lostmsu closed 4 years ago

lostmsu commented 5 years ago

E.g.

new Flatten(kwargs: new { input_shape = (28, 28) })

instead of

new Flatten(kwargs: new PythonDict<string, object> { ["input_shape"] = (28, 28) })
lostmsu commented 4 years ago

To avoid accidental type confusion, the syntax will be, for example,

new Flatten(kwargs: new { input_shape = (28, 28) }.AsKwArgs());