InterviewStack.io LogoInterviewStack.io

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
0 practiced
Provide a short Python script to export a tf.keras model to SavedModel and then convert it to a TFLite model using post-training quantization. Include a representative dataset generator for calibration and explain accuracy vs performance trade-offs and when to prefer TFLite for deployment.
EasyTechnical
0 practiced
In TensorFlow Keras, explain the purpose and difference between the 'build' and 'call' methods when creating custom layers (tf.keras.layers.Layer). Provide an outline of a custom layer that declares weights in build and uses them in call. Explain why get_config is required for serialization.
MediumTechnical
0 practiced
Compare torch.nn.DataParallel and torch.nn.parallel.DistributedDataParallel (DDP). Explain performance, memory and correctness trade-offs, common pitfalls (e.g., randomness, BatchNorm behavior), and outline steps to convert a single-node multi-GPU training script from DataParallel to DDP.
HardTechnical
0 practiced
After switching training from float32 to float16, training loss becomes NaN. Provide a systematic debugging and mitigation plan covering: enabling loss scaling, identifying layers/ops causing instability, temporarily casting problematic ops to float32, checking data preprocessing and label ranges, and reviewing optimizer hyperparameters.
HardTechnical
0 practiced
Outline how to implement pipeline parallelism for a very large model using torch.distributed.rpc or torch.distributed.pipeline.sync. Describe how to partition the model across worker ranks, schedule forward and backward passes, manage micro-batches to keep the pipeline filled, handle parameter synchronization and checkpointing, and measure the latency vs throughput trade-offs.

Unlock Full Question Bank

Get access to hundreds of TensorFlow/PyTorch Framework Fundamentals interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.