Skip to content

Why not move images onto gpu? #862

Closed
@I-Doctor

Description

@I-Doctor

if args.gpu is not None:

I'm trying to training vgg on imagenet with one node DataParallel and no multiprocessing。But I find 'images.device' before computation is 'cpu', and 'target.device=cuda:0'. I'm not sure why these four lines of codes move 'images' to gpu only when I choose only one gpu(args.gpu is not None) and move 'target' to gpu even with argument device=None(args.gpu=None).

I would appreciate it if someone could help me understand it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions