__init__.py 1013 B

1234567891011121314151617181920212223242526272829
  1. # Copyright (c) Facebook, Inc. and its affiliates.
  2. # All rights reserved.
  3. #
  4. # This source code is licensed under the BSD-style license found in the
  5. # LICENSE file in the root directory of this source tree.
  6. import torch
  7. from . import _C
  8. # Top-level APIs. Please think carefully before adding something to the
  9. # top-level namespace:
  10. # - private helper functions should go into torch._functorch
  11. # - very experimental things should go into functorch.experimental
  12. # - compilation related things should go into functorch.compile
  13. # Was never documented
  14. from torch._functorch.python_key import make_fx
  15. from torch._functorch.deprecated import (
  16. vmap, grad, grad_and_value, vjp, jvp, jacrev, jacfwd, hessian, functionalize,
  17. make_functional, make_functional_with_buffers, combine_state_for_ensemble,
  18. )
  19. # utilities. Maybe these should go in their own namespace in the future?
  20. from torch._functorch.make_functional import (
  21. FunctionalModule,
  22. FunctionalModuleWithBuffers,
  23. )
  24. __version__ = torch.__version__