OpenMined / Threepio

A multi-language library for translating commands between PyTorch, TensorFlow, and TensorFlow.js
Other
56 stars 15 forks source link

py/translate: Map PyTorch tensor __rsub__ to sub for Tensorflow.js. #122

Closed juharris closed 4 years ago

juharris commented 4 years ago

Description

This will help with using tanh in a PySyft Plan since TanhBackward has grad_self_ = grad * (1 - self.self_.tanh() ** 2).

Affected Dependencies

How has this been tested?

Tests in PR.

Checklist