class_docstr: Tests ``fully_shard`` with mixed precision.
class_docstr_tok: ["Tests","``","fully_shard","``","with","mixed","precision","."]
code: def _validate_eval(
      self, input: Dict[nn.Module, torch.Tensor], fsdp_model: nn.Module
  ):
      # validate eval mode always forces full precision
      fsdp_model.eval()
      _ = fsdp_model(input)
      self.assertEqual(
          fsdp_model.forward_inputs[fsdp_model.c1].dtype, torch.float32
      )
      self.assertEqual(
          fsdp_model.forward_inputs[fsdp_model.c2].dtype, torch.float32
      )
      fsdp_model.train()
  
file_path: pytorch/test/distributed/_composable/fully_shard/test_fully_shard_mixed_precision.py
imports: import sys
  from typing import Dict, NamedTuple, Optional
  import torch
  import torch.distributed
  import torch.nn
  from torch.distributed._composable import fully_shard
  from torch.distributed.fsdp import MixedPrecision
  from torch.testing._internal.common_distributed import SaveForwardInputsModel, skip_if_lt_x_gpu
  from torch.testing._internal.common_fsdp import FSDPTest
  from torch.testing._internal.common_utils import run_tests, TEST_WITH_DEV_DBG_ASAN
label_desc: Use image node_id 5 for calling the TestMixedPrecision obj's underlying member method code with example usage: obj._validate_eval(input, fsdp_model) without return types