Add some tests with the new framework for auto testing (#5561)
* Test 'nn.Linear' and 'nn.Identity' with random data * Test 'nn.PixelShuffle' with random data * Test 'greater' and 'less' with random data * Test 'flow.Tensor.flatten' with random data * Test 'greater' and 'less' with random-sized data * Test 'nn.CrossEntropyLoss' with random data * Replace multiple return entries with the 'oneof' generator * Add 'nothing()' test cases for parameters with default values * Remove the hard-coded test cases of `nn.CrossEntropyLoss` * auto format by CI * Skip the test of 'nn.CrossEntropyLoss' temporarily Co-authored-by:oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com> Co-authored-by:
oneflow-ci-bot <ci-bot@oneflow.org>
Showing
- oneflow/python/test/modules/test_crossentropyloss.py 20 additions, 98 deletionsoneflow/python/test/modules/test_crossentropyloss.py
- oneflow/python/test/modules/test_crossentropyloss_grad.py 0 additions, 235 deletionsoneflow/python/test/modules/test_crossentropyloss_grad.py
- oneflow/python/test/modules/test_flatten.py 10 additions, 0 deletionsoneflow/python/test/modules/test_flatten.py
- oneflow/python/test/modules/test_greater.py 23 additions, 3 deletionsoneflow/python/test/modules/test_greater.py
- oneflow/python/test/modules/test_less.py 20 additions, 0 deletionsoneflow/python/test/modules/test_less.py
- oneflow/python/test/modules/test_linear.py 211 additions, 183 deletionsoneflow/python/test/modules/test_linear.py
- oneflow/python/test/modules/test_pixel_shuffle.py 13 additions, 0 deletionsoneflow/python/test/modules/test_pixel_shuffle.py
- oneflow/python/test_utils/automated_test_util/generators.py 54 additions, 4 deletionsoneflow/python/test_utils/automated_test_util/generators.py
- oneflow/python/test_utils/automated_test_util/torch_flow_dual_object.py 14 additions, 3 deletions.../test_utils/automated_test_util/torch_flow_dual_object.py
Please register or sign in to comment