KEMBAR78
Why there is a `device_id` parameter in `nn.module.cpu()` call? · Issue #1991 · pytorch/pytorch · GitHub
Skip to content

Why there is a device_id parameter in nn.module.cpu() call? #1991

@lanpa

Description

@lanpa

pytorch/torch/nn/modules/modules.py

def cpu(self, device_id=None):
    """Moves all model parameters and buffers to the CPU."""
    return self._apply(lambda t: t.cpu())

as shown in source code, this parameters is not used. Any reason that we keep it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    todoNot as important as medium or high priority tasks, but we will work on these.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions