`hybrid_forward` passes the parameters as part of the function arguments, so 
you would access them by defining them or using `kwargs`.  Then we can use them 
as usual for both hybridized and non-hybridized versions.

```
class ElmoEmbedding(gluon.HybridBlock):
    def __init__(self):
        ...
    def hybrid_forward(self, F, x, *args, **kwargs):
        weights = kwargs['weights']
        scales = kwargs['scales']
        normalized_weights = F.softmax(weights)
        ...     
```





---
[Visit 
Topic](https://discuss.mxnet.apache.org/t/how-to-apply-f-softmax-to-gluon-parameters/6930/3)
 or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.mxnet.apache.org/email/unsubscribe/53ea94e87ad8805344f741777f41d4c406ca72079ba1973e7dbbd93a433b7ce7).

Reply via email to