TensorFlow/PyTorch Framework Fundamentals Questions
Practical knowledge of a major deep learning framework. Includes understanding tensors, operations, building neural network layers, constructing models, and training loops. Ability to read and modify existing code in these frameworks. Knowledge of how to work with pre-built layers and models.
MediumTechnical
41 practiced
Implement a simple callback system in a PyTorch training loop to support ModelCheckpoint, EarlyStopping, and ReduceLROnPlateau behaviors similar to Keras. Show how callbacks can hook into events (on_epoch_end, on_batch_end), save state, and be included in checkpoint artifacts.
MediumTechnical
50 practiced
Show how to set up parameter groups in PyTorch to use different learning rates for the model head and the backbone (for example, a pre-trained CNN base with a new classifier head). Provide code that collects params into groups and passes them to AdamW with distinct lr values.
MediumTechnical
44 practiced
You suspect your PyTorch DataLoader is the bottleneck. Describe and prioritize a set of experiments and code changes to diagnose and fix the issue: increase num_workers, use persistent_workers, set pin_memory=True, move augmentation to compiled ops, switch to IterableDataset, and measure throughput. Also mention potential deadlocks and how to detect them.
HardSystem Design
71 practiced
Design a distributed training strategy using PyTorch DistributedDataParallel (DDP) to train a model across 8 nodes with 8 GPUs each (64 GPUs total). Describe initialization, choice of backend, data sharding, gradient synchronization, handling of BatchNorm, checkpointing strategy, fault tolerance, and how to scale the learning rate appropriately.
MediumTechnical
47 practiced
Implement a custom tf.keras Layer that performs a Squeeze-and-Excitation (SE) block (squeeze global average pooling, two FC layers with activation and sigmoid) and show how to add get_config() so the layer is serializable in a SavedModel. Provide a short example of integrating the SE block into a simple Sequential model.
Unlock Full Question Bank
Get access to hundreds of TensorFlow/PyTorch Framework Fundamentals interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.