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

:cuda() support for target_module in dp.Experiment or dp.Propagator #191

Open
Vladimir-Yashin opened this issue Mar 19, 2016 · 0 comments
Open

Comments

@Vladimir-Yashin
Copy link

dp.Experiment can be parametrized with target_module which is just passed to dp.Propagator instances.
dp.Propagator has :type() function which is used to convert _loss (Criterion), but not target_module.

The problem is that when dp.Experiment:cuda() is called the target_module is not modified, so execution fails unless targetModule:cuda() call is done manually in addition to dp.Experiment:cuda()

It would be nice for dp.Propagator to handle target_module conversion too:

function Propagator:type(new_type)
   if self._loss then
      self._loss:type(new_type)
   end
   -- here goes support for target_module
   if self._target_module then
      self._target_module:type(new_type)
   end
end

Alternatively this can be done in dp.Experiment.

Thanks.

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

No branches or pull requests

1 participant