InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following is used to load dataset in batches? |
|
Answer» Which of the FOLLOWING is used to LOAD dataset in batches? |
|
| 2. |
If the shape of the Tensor is 2 x 1 x 3 x 1, performing torch.sqeeze() will output Tensor of shape _______. |
|
Answer» If the shape of the Tensor is 2 x 1 x 3 x 1, performing torch.sqeeze() will OUTPUT Tensor of shape _______. |
|
| 3. |
For an optimizer defined, which of the following function is used to update the parameters passed to the optimizer? |
|
Answer» For an optimizer defined, which of the following function is used to update the PARAMETERS passed to the optimizer? |
|
| 4. |
While defining the Tensor, which of the following parameters is used to track the gradients on Tensor? |
|
Answer» While defining the Tensor, which of the FOLLOWING parameters is used to track the gradients on Tensor? |
|
| 5. |
Once you train model weights, bias can be accessed using ____________. |
|
Answer» Once you TRAIN model weights, BIAS can be accessed using ____________. |
|
| 6. |
For x = torch.Tensor([1, 2, 3, 4]), after x = torch.unsqueeze(x, 0) x will be of the shape _______. |
|
Answer» For x = torch.Tensor([1, 2, 3, 4]), after x = torch.unsqueeze(x, 0) x will be of the shape _______. |
|
| 7. |
Which of the following is used to load the weights into the model from the file? |
|
Answer» Which of the FOLLOWING is USED to LOAD the weights into the model from the file? |
|
| 8. |
Which of the following function is used to convert NumPy array to Tensor? |
|
Answer» Which of the following function is used to CONVERT NUMPY array to Tensor? |
|
| 9. |
Which of the following function is used to save the model parameters to a file? |
|
Answer» Which of the following FUNCTION is used to SAVE the model PARAMETERS to a file? |
|
| 10. |
Which of the following is used to view the shape of the Tensor? |
|
Answer» Which of the following is used to view the shape of the TENSOR? |
|
| 11. |
Which of the following function is used to compute the gradients on a loss function? |
|
Answer» Which of the following function is USED to COMPUTE the gradients on a loss function? |
|
| 12. |
Which of the following functions is used to save the model parameters to a file? |
|
Answer» Which of the following functions is used to SAVE the MODEL parameters to a file? |
|
| 13. |
Which of the following function is used to covert NumPy array to Tensor? |
|
Answer» Which of the FOLLOWING FUNCTION is used to COVERT NumPy array to Tensor? |
|
| 14. |
Which of the following is the base class for all the neural networks in PyTorch? |
|
Answer» Which of the FOLLOWING is the BASE class for all the neural networks in PYTORCH? |
|
| 15. |
PyTorch requires the graph to be defined before running the model. |
|
Answer» PyTorch REQUIRES the graph to be defined before running the model. |
|
| 16. |
Which of the following constructor is used to add convolution layer while building the model? |
|
Answer» Which of the following constructor is USED to add convolution layer while BUILDING the model? |
|
| 17. |
Which of the following defines the convolution layer with a 3 input channel, four out channels and a 3 x 3 filter? |
|
Answer» Which of the following DEFINES the convolution layer with a 3 input channel, four out CHANNELS and a 3 x 3 FILTER? |
|
| 18. |
If the model has 10 features, and two hidden layers of 20 nodes and 30 nodes, the network is defined as ___________. |
|
Answer» If the model has 10 features, and two hidden layers of 20 nodes and 30 nodes, the network is defined as ___________. |
|
| 19. |
Pre-trained models in PyTorch can be downloaded from which of the following modules? |
|
Answer» Pre-trained MODELS in PYTORCH can be DOWNLOADED from which of the following modules? |
|
| 20. |
The network defined using nn.Module() must have a method named forward(). |
|
Answer» The network defined using nn.Module() must have a method named forward(). |
|
| 21. |
Which of the following is used to convert NumPy array to Tensor? |
|
Answer» Which of the following is used to CONVERT NUMPY array to Tensor? |
|
| 22. |
Which of the following constructor is used as an FC layer to the network? |
|
Answer» Which of the following CONSTRUCTOR is used as an FC layer to the NETWORK? |
|
| 23. |
Which of the following functions is used to move the Tensors from CPU to GPU? |
|
Answer» Which of the FOLLOWING functions is used to move the Tensors from CPU to GPU? |
|
| 24. |
Which of the following functions is used to initialize Tensors in PyTorch randomly? |
|
Answer» Which of the following functions is used to initialize Tensors in PyTorch RANDOMLY? |
|
| 25. |
Which of the following function is used to stop tracking gradients on Tensor? |
|
Answer» Which of the following function is used to STOP tracking gradients on Tensor? |
|
| 26. |
Computing softmax activation can be skipped when using nn.CrossEntropyLoss. |
|
Answer» Computing softmax activation can be SKIPPED when USING nn.CrossEntropyLoss. |
|
| 27. |
Which of the following functions is used to reshape the Tensors in PyTorch? |
|
Answer» Which of the following functions is used to RESHAPE the Tensors in PyTorch? |
|
| 28. |
The model.eval() is used to _________. |
|
Answer» The model.eval() is used to _________. |
|
| 29. |
Which of the following function is used to move the Tensors from CPU to GPU? |
|
Answer» Which of the following function is USED to MOVE the Tensors from CPU to GPU? |
|
| 30. |
While operating on Tensors a function name followed by underscore means ___________. |
|
Answer» While operating on Tensors a function name followed by underscore means ___________. |
|
| 31. |
On max pooling image of shape 20 x 20 using filter 4 x 4 and stride = 2, what will be the shape of the output? |
|
Answer» On max pooling image of shape 20 X 20 using FILTER 4 x 4 and stride = 2, what will be the shape of the output? |
|
| 32. |
Which of the following constructor is used to define the layers sequentially? |
|
Answer» Which of the following constructor is used to define the layers sequentially? |
|