10000 .numpy() command in _aggregate_token_embeddings isn't detaching from GPU into CPU label:bug · Issue #5652 · allenai/allennlp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
.numpy() command in _aggregate_token_embeddings isn't detaching from GPU into CPU label:bug #5652
Closed
@lizardintelligence

Description

@lizardintelligence

I believe embeddings.numpy() on line 45 and 63 of saliency_interpreter.py should be embeddings.detach().cpu().numpy()
Otherwise while running the interpretation on GPU has a error 'TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0