mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-28 10:34:54 +08:00
Relax check on outputs (#15458)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15458 many nets in the wild seem to have outputs that are never produced by the net. Reviewed By: ZolotukhinM Differential Revision: D13534185 fbshipit-source-id: 2b23b39c28404c53f68868f3bf6df53c5fea9eab
This commit is contained in:
committed by
Facebook Github Bot
parent
6bf05bfde6
commit
235d47760b
@ -328,16 +328,15 @@ class TestTransformations(tu.TestCase):
|
||||
atol=1e-04
|
||||
)
|
||||
|
||||
def test_converterEnforceUnusedInputs(self):
|
||||
def test_converterDontEnforceUnusedInputs(self):
|
||||
net = core.Net("net")
|
||||
net.Relu(["X"], ["Y"])
|
||||
net.Proto().external_input.extend(["fake"])
|
||||
# This should now work
|
||||
transformer.AddNNPACK(net) # just testing the converter
|
||||
|
||||
def test_converterEnforceUnusedOutputs(self):
|
||||
def test_converterDontEnforceUnusedOutputs(self):
|
||||
net = core.Net("net")
|
||||
net.Relu(["X"], ["Y"])
|
||||
net.Proto().external_output.extend(["fake"])
|
||||
with self.assertRaises(Exception):
|
||||
transformer.AddNNPACK(net) # just testing the converter
|
||||
transformer.AddNNPACK(net) # just testing the converter
|
||||
|
||||
Reference in New Issue
Block a user