Pytorch Interview Questions (MCQ): Test Your Knowledge! Which PyTorch function computes the element-wise multiplication of tensors?torch.mul()torch.multiply()torch.prod()Both a and bWhat is the primary function of torchvision in PyTorch?To visualize tensorsTo provide tools and datasets for computer visionTo optimize vision modelsTo create custom vision layersWhat is the purpose of torch.nn.utils.parametrizations.orthogonal in PyTorch?To create orthogonal matricesFor orthogonal parametrization of linear layersTo implement QR decompositionTo optimize matrix operationsHow do you create a tensor with values drawn from a standard normal distribution?torch.randn(size)torch.normal(size)torch.gaussian(size)torch.standard_normal(size)What does the torch.transpose() function do?Flips a tensor along specified dimensionsSwaps two dimensions of a tensorRotates a tensorReverses the order of elements in a tensorHow can data shuffling be implemented in PyTorch's DataLoader?By setting shuffle=TrueBy using torch.shuffle()By implementing a custom DatasetBy modifying the model architectureWhich of the following is NOT a valid normalization technique in PyTorch?InstanceNorm3dBatchNorm2dLayerNormGroupNormWhich parameter in StepLR specifies the interval for learning rate decay?step_sizeintervaldecay_steplr_stepHow does torch.sparse work in PyTorch?It manages memory sparselyFor operations on sparse tensorsTo implement sparse neural networksTo optimize storage for sparse dataWhat is the main advantage of PyTorch's dynamic computational graphs?They allow for more flexible and intuitive model buildingThey are faster than static graphsThey use less memoryThey are easier to deployWhich PyTorch function applies instance normalization?nn.InstanceNorm1d()nn.InstanceNorm2d()nn.InstanceNorm3d()All of the aboveHow do you create a tensor with a specific data type?torch.tensor([1, 2, 3], dtype=torch.float32)torch.create([1, 2, 3], type=torch.float32)torch.array([1, 2, 3], dtype=torch.float32)torch.new([1, 2, 3], dtype=torch.float32)What is transfer learning in PyTorch?Transferring data between GPUsUsing pre-trained models for new tasksTransferring gradients between layersMoving tensors between devicesWhat is the primary function of torch.nn.ReLU in PyTorch?To normalize inputsTo apply rectified linear activationTo compute lossTo optimize weightsWhat does the requires_grad attribute of a PyTorch tensor control?Whether to compute gradients for the tensorWhether the tensor can be modifiedWhether the tensor can be moved to GPUWhether the tensor can be saved to diskHow can you implement custom DataLoader in PyTorch?By subclassing torch.utils.data.DataLoaderUsing the @dataloader decoratorModifying the iter() method of DatasetPyTorch doesn't support custom DataLoadersWhat is the main advantage of the Adam optimizer?It's the fastestIt adapts the learning rate for each parameterIt doesn't require hyperparameter tuningIt's immune to vanishing gradientsWhat is the main purpose of the torch.clamp() function in PyTorch?To compute gradientsTo clip tensor values to a rangeTo normalize tensor valuesTo reshape tensorsWhich PyTorch method is used to compute gradients during backpropagation?backward()backprop()gradient()differentiate()How do you create a tensor with evenly spaced values on a log scale?torch.logspace(start, end, steps)torch.log_range(start, end, steps)torch.logarithmic_space(start, end, steps)torch.log_linspace(start, end, steps) Score: 0/20 Next Set of Questions