mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Rename NewCriterionTest to CriterionTest. (#44056)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/44056 Test Plan: Imported from OSS Reviewed By: zou3519 Differential Revision: D23482573 Pulled By: gchanan fbshipit-source-id: dde0f1624330dc85f48e5a0b9d98fb55fdb72f68
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7d95eb8633
commit
5973b44d9e
@ -21,7 +21,7 @@ TorchNNModuleTestParams = namedtuple(
|
||||
# Unique identifier for this module config (e.g. "BCELoss_weights_cuda")
|
||||
'module_variant_name',
|
||||
|
||||
# An instance of an NN test class (e.g. `NewCriterionTest`) which stores
|
||||
# An instance of an NN test class (e.g. `CriterionTest`) which stores
|
||||
# necessary information (e.g. input / target / extra_args) for running the Python test
|
||||
'test_instance',
|
||||
|
||||
@ -184,7 +184,7 @@ def move_cpp_tensors_to_device(cpp_tensor_stmts, device):
|
||||
return ['{}.to("{}")'.format(tensor_stmt, device) for tensor_stmt in cpp_tensor_stmts]
|
||||
|
||||
def is_criterion_test(test_instance):
|
||||
return isinstance(test_instance, common_nn.NewCriterionTest)
|
||||
return isinstance(test_instance, common_nn.CriterionTest)
|
||||
|
||||
# This function computes the following:
|
||||
# - What variable declaration statements should show up in the C++ parity test function
|
||||
|
Reference in New Issue
Block a user