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

A way to invoke functions, wrapped in `PythonFunctionContainer` #19

Closed lostmsu closed 4 years ago

lostmsu commented 5 years ago

In Keras you can access activation functions like this: var activation = tf.keras.activations.some_activation_fn;

In Preview 6 you need to cast it to dynamic, to apply it to a tensor, which is quite ugly: ((dynamic)activation)(tensor1, tensor2).

Ideally, I'd like to be able to call activation.Invoke(tensor1, tensor2)