All Practice Exams

100+ Free PyTorch Certified Associate Practice Questions

Prepare for the PyTorch Certified Associate (PTCA) exam with instant access — no signup required.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
100+ Questions
100% Free

Loading practice questions...

2026 Statistics

Key Facts: PyTorch Certified Associate Exam

~$250

Exam Voucher Value (USD)

Linux Foundation

Linux Foundation

Administering Body

Linux Foundation / PyTorch Foundation

Online proctored

Delivery Format

Linux Foundation

Applied + knowledge

Assessment Type

Linux Foundation

Not published

Question Count and Passing Score

Linux Foundation (not disclosed)

Associate

Certification Level

Linux Foundation

The PyTorch Certified Associate (PTCA) is a Linux Foundation and PyTorch Foundation credential validating foundational PyTorch skills for building, training, and deploying models. It is delivered online with remote proctoring and combines applied tasks with a knowledge assessment, with an exam fee of roughly $250 USD. The exact question count, time limit, and passing score are not published. Core domains are PyTorch fundamentals (tensors, autograd, CUDA), building neural networks (nn.Module, layers, losses, optimizers), data handling (Dataset, DataLoader, transforms), training and evaluation loops, model saving and deployment (state_dict, TorchScript, ONNX), and debugging and best practices.

Sample PyTorch Certified Associate Practice Questions

Try these sample questions to test your PyTorch Certified Associate exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1In PyTorch, which function creates a tensor filled with zeros of shape (2, 3)?
A.torch.empty(2, 3)
B.torch.ones(2, 3)
C.torch.zeros(2, 3)
D.torch.rand(2, 3)
Explanation: torch.zeros(2, 3) returns a tensor of the given shape with every element initialized to 0. The shape is passed as separate integer arguments or as a tuple/list.
2What attribute must a tensor have set to True for autograd to track operations and compute its gradient during backpropagation?
A.is_leaf
B.requires_grad
C.is_cuda
D.retain_grad
Explanation: Setting requires_grad=True tells autograd to record all operations on the tensor in the computation graph so that calling .backward() can compute gradients with respect to it. Model parameters wrapped in nn.Parameter have this set to True by default.
3Which method moves a tensor x onto a CUDA GPU device in a device-agnostic way that also works on CPU-only machines?
A.x.cuda(force=True)
B.x.gpu()
C.x.device('cuda')
D.x.to(device) where device is set from torch.cuda.is_available()
Explanation: The idiomatic pattern is device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') followed by x = x.to(device). This moves the tensor to the GPU when one is present and stays on CPU otherwise, making the code portable.
4What does calling .backward() on a scalar loss tensor do?
A.It updates the model weights using the optimizer
B.It computes the gradients of the loss with respect to all leaf tensors that have requires_grad=True
C.It zeroes out all previously accumulated gradients
D.It performs the forward pass through the network
Explanation: loss.backward() runs reverse-mode automatic differentiation through the computation graph, populating the .grad attribute of every leaf tensor with requires_grad=True. It computes gradients but does not modify the parameter values.
5Which statement about torch.Tensor.view() versus torch.Tensor.reshape() is correct?
A.view() always copies data while reshape() never copies
B.view() requires the tensor to be contiguous in memory and returns a view sharing storage, while reshape() may return a view or a copy
C.Both always return a copy with independent storage
D.reshape() only works on 1-D tensors
Explanation: view() returns a tensor sharing the same underlying storage and requires the data to be compatible with the requested shape, which typically means contiguous memory. reshape() returns a view when possible but falls back to copying when the layout is not contiguous, so it is more permissive.
6What does tensor.detach() return?
A.A deep copy of the tensor on a new device
B.The gradient of the tensor
C.A new tensor sharing the same data but detached from the computation graph, with requires_grad=False
D.An in-place modified version of the tensor that stops further operations
Explanation: detach() returns a new tensor that shares the same underlying data but is removed from the autograd graph, so it never requires gradients and operations on it are not tracked. It is commonly used to use a value without backpropagating through it.
7By convention, what do PyTorch tensor methods ending in an underscore, such as add_() or relu_(), indicate?
A.They are private internal methods
B.They perform the operation in-place, modifying the tensor directly
C.They always return a tensor on the GPU
D.They are deprecated and should not be used
Explanation: A trailing underscore marks an in-place operation that mutates the calling tensor and returns it, rather than allocating a new tensor. For example, x.add_(1) adds 1 to x directly. In-place ops can save memory but may break autograd if they overwrite values needed for the backward pass.
8Which context manager disables gradient tracking to speed up inference and reduce memory usage?
A.with torch.enable_grad():
B.with torch.autograd.detect_anomaly():
C.with torch.no_grad():
D.with torch.set_grad_enabled(True):
Explanation: with torch.no_grad(): turns off autograd for all operations inside the block, so no computation graph is built. This lowers memory consumption and speeds up forward passes during inference and validation, where gradients are not needed.
9Given a = torch.tensor([1.0, 2.0, 3.0]), what does a.shape return?
A.torch.Size([1, 3])
B.3
C.(3, 1)
D.torch.Size([3])
Explanation: A 1-D tensor with three elements has shape torch.Size([3]), a single-dimension size object. torch.Size is a subclass of tuple, so it can be indexed and unpacked like one.
10Which operation performs matrix multiplication of two 2-D tensors A and B in PyTorch?
A.A * B
B.torch.mul(A, B)
C.torch.matmul(A, B) or A @ B
D.A + B
Explanation: torch.matmul(A, B), equivalently the @ operator, computes matrix multiplication and supports broadcasting for batched tensors. For 2-D inputs the inner dimensions must agree.

About the PyTorch Certified Associate Exam

The PyTorch Certified Associate (PTCA) is a foundational certification from the Linux Foundation and the PyTorch Foundation that validates the ability to build, train, evaluate, and deploy deep learning models with PyTorch. It covers PyTorch fundamentals such as tensors, tensor operations, autograd, and CUDA devices; building neural networks with nn.Module, layers, activation functions, loss functions, and optimizers; data handling with Dataset, DataLoader, and transforms; training and evaluation loops; model saving, loading, and deployment with state_dict, TorchScript, and ONNX; plus debugging and best practices. The exam is delivered online with remote proctoring and blends applied, hands-on tasks with a knowledge assessment. It was beta-tested by the Linux Foundation in late 2025 and into 2026, so some logistics may change at general availability.

Assessment

Question count not published by the exam provider

Time Limit

Not published

Passing Score

Not published

Exam Fee

~$250 (The Linux Foundation / PyTorch Foundation)

PyTorch Certified Associate Exam Content Outline

~22%

PyTorch fundamentals

Create and reshape tensors, run tensor operations with broadcasting, track gradients with autograd and requires_grad, use torch.no_grad and detach, and write device-agnostic code that moves tensors between CPU and CUDA.

~22%

Building neural networks

Subclass nn.Module and define forward(), compose layers like nn.Linear and nn.Conv2d, apply activations such as ReLU and Softmax, choose losses like CrossEntropyLoss and MSELoss, and configure optimizers such as SGD and Adam with learning rate and weight decay.

~16%

Data handling

Implement custom Dataset classes with __len__ and __getitem__, batch and shuffle with DataLoader, apply torchvision transforms including ToTensor and Normalize, and customize collate_fn, num_workers, and pin_memory for efficient loading.

~18%

Training and evaluation loops

Run the zero_grad, backward, step cycle in the correct order, switch between model.train() and model.eval(), evaluate under torch.no_grad(), and compute metrics such as running loss and accuracy with argmax.

~12%

Model saving, loading, deployment, and inference

Save and load models with state_dict, build resumable checkpoints, map storages across devices with map_location, compile to TorchScript using trace versus script, and export models to ONNX for cross-runtime inference.

~10%

Debugging and best practices

Diagnose vanishing, exploding, and NaN gradients with anomaly detection and gradient clipping, fix device-mismatch and CUDA out-of-memory errors, seed all RNGs for reproducibility, and regularize against overfitting.

How to Pass the PyTorch Certified Associate Exam

What You Need to Know

  • Passing score: Not published
  • Assessment: Question count not published by the exam provider
  • Time limit: Not published
  • Exam fee: ~$250

Keys to Passing

  • Work through all 100 available questions
  • Review every answer and explanation
  • Track weak areas and revisit them
  • Use our AI tutor for tough concepts

PyTorch Certified Associate Study Tips from Top Performers

1Write training loops by hand until the optimizer.zero_grad(), loss.backward(), optimizer.step() order and the role of each call feel automatic.
2Practice device-agnostic code: set device from torch.cuda.is_available() and call .to(device) on the model, inputs, and targets to avoid device-mismatch errors.
3Master autograd mechanics: requires_grad, leaf versus non-leaf tensors, detach(), and torch.no_grad(), and know that gradients accumulate unless you zero them.
4Always switch to model.eval() and wrap evaluation in torch.no_grad() so Dropout and BatchNorm behave correctly and inference is faster and lower memory.
5Build custom Dataset and DataLoader pipelines, including transforms.Compose, collate_fn for variable-length inputs, num_workers, and pin_memory.
6Know the deployment path: save and load state_dict, build checkpoints with optimizer state, and compare TorchScript trace versus script and ONNX export for serving.

Frequently Asked Questions

What are the current exam facts for the PTCA?

The PyTorch Certified Associate is a Linux Foundation and PyTorch Foundation credential delivered online with remote proctoring, combining applied tasks with a knowledge assessment. The exam fee is approximately $250 USD. The exact question count, time limit, and passing score have not been published.

Who administers the PyTorch Certified Associate exam?

The exam is administered by the Linux Foundation in partnership with the PyTorch Foundation, the same body that maintains the open-source PyTorch project. It is part of the Linux Foundation's certification catalog.

What topics does the PTCA cover?

The PTCA covers PyTorch fundamentals (tensors, autograd, CUDA), building neural networks with nn.Module, data handling with Dataset and DataLoader, training and evaluation loops, model saving and deployment with state_dict, TorchScript, and ONNX, and debugging and best practices.

How much does the PTCA exam cost?

The exam voucher is valued at approximately $250 USD. It is sometimes bundled with the PyTorch Associate Training course, which is priced separately and includes a voucher upon completion.

What is the passing score for the PTCA?

The Linux Foundation has not published a specific passing score or question count for the PTCA. The exam was beta-tested in late 2025 and into 2026, and exact logistics may be confirmed at general availability.

How should I prepare for the PTCA?

Get hands-on writing tensor operations, custom training loops, and Dataset/DataLoader pipelines, since the exam includes applied tasks. Drill the forward/backward/step order, train versus eval mode, state_dict saving, and TorchScript or ONNX export until each pattern is routine.