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

Reintroduce SetFitModel.to #236

Merged
merged 1 commit into from
Dec 15, 2022

Commits on Dec 14, 2022

  1. Add SetFitModel.to (huggingface#229)

    * Add SetFitModel.to
    
    * Add docstring for 'to' to clarify that we don't copy
    
    Note that this does mean that we differ from e.g. torch, which creates a moved copy rather than moving the e.g. tensor itself to a different device.
    
    * Add tests for 'to'.
    
    If CUDA is available, then try to move a model from the CPU to the GPU and back to the CPU.
    
    * Reformat test_modeling
    
    Co-authored-by: Tom Aarsen <Cubiegamedev@gmail.com>
    jegork and tomaarsen committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    cf2a61c View commit details
    Browse the repository at this point in the history