graykode / graykode/nlp-tutorial

Transformer/Transformer(Greedy_decoder)-Torch.py on gpu

Open
#35 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
14.9k
Forks
3.9k
PR merge metrics
No merged PRs in 30d

Description

Hello, I want to put the Transformer (Greedy_decoder)-Torch.py code on the gpu, using model=model.to(device), input_data also to (device), but the error still appears "Expected object of backend CUDA but backend CPU for argument #2 'mat2”

Contributor guide

Open the contributing guide

Research direction

Start with Transformer/Transformer(Greedy_decoder)-Torch.py and reproduce the reported CUDA-versus-CPU mat2 error. Trace the devices of model, input_data, and the tensors involved in the failing operation. Done means the example runs on the GPU without a backend mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.