Concept

Cross-Device Model Operation Constraint

For a neural network model to successfully calculate a result, both the input data tensors and the model's parameters must reside on the exact same hardware device. If an input tensor XX is located on a GPU, the model executing the forward pass must also be allocated to that same GPU. Efficient model learning requires that all interacting data and parameters share the same device to prevent blocking or framework errors.

0

1

Updated 2026-05-09

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L