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

Add chainer_torch_function and TorchCainerFunction #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

emcastillo
Copy link
Member

@emcastillo emcastillo commented Jun 19, 2020

This allows to call a PyTorch function and combine it with chainer functions and the opposite.

The backprop of both Chainer and PyTorch is mixed, being the backprop of torch performed inside the chainer graph.
The main difference with TorchModule is that the latter only holds one graph in PyTorch and the changes are reflected in the parameters of a chainer link. This PR allows us to construct mixed graphs. The same is done for the opposite user case.

This is useful when doing migrations since it allows us to replace functions in the model part by part.

@emcastillo emcastillo force-pushed the chainer-torch-function branch from b7c0d80 to fd80272 Compare June 19, 2020 05:14
@kmaehashi kmaehashi self-assigned this Jun 22, 2020
@ando-takahiro
Copy link

Thanks for the PR. As long as I tested, this function works pretty well. It would be helpful for other users also.

@emcastillo emcastillo force-pushed the chainer-torch-function branch from ea3635c to dd4d223 Compare July 22, 2020 10:08
@emcastillo emcastillo changed the title Add chainer_torch_function Add chainer_torch_function and TorchCainerFunction Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants