Learn Before
Concept
Model Parameter Device Allocation
In deep learning frameworks, a neural network model and its underlying parameters can be explicitly allocated to a specific hardware device, such as a GPU, for storage and computation. For example, this is achieved using net.to(device=try_gpu()) in PyTorch, net.initialize(ctx=try_gpu()) in MXNet, or by instantiating the model within a strategy.scope() in TensorFlow.
0
1
Updated 2026-05-09
Tags
D2L
Dive into Deep Learning @ D2L