TrainingExtensions/torch/test/python/test_model_preparer.py
def evaluate(model: torch.nn.Module, dummy_input: torch.Tensor):
    """
    Helper function to evaluate model given dummy input
    :param model: torch model
    :param dummy_input: dummy input to model
    """
    model.eval()
    with torch.no_grad():
        model(dummy_input)

    Helper function to evaluate model given dummy input
    :param model: torch model
    :param dummy_input: dummy input to model
    
Helper function to evaluate model given dummy input
Helper function to evaluate model given dummy input
def evaluate(model: torch.nn.Module, dummy_input: torch.Tensor):
    model.eval()
    with torch.no_grad():
        model(dummy_input)
def evaluate ( model : torch . nn . Module , dummy_input : torch . Tensor ) : model . eval ( ) with torch . no_grad ( ) : model ( dummy_input )
Helper function to evaluate model given dummy input
Helper function to evaluate model given dummy input
"""
    Helper function to evaluate model given dummy input
    :param model: torch model
    :param dummy_input: dummy input to model
    """
model
torch.nn.Module
None
dummy_input
torch.Tensor
dummy input to model
dummy input to model