Skip to content

Commit

Permalink
Add examples converted from UCI to the new text format
Browse files Browse the repository at this point in the history
    Add/convert all examples from Examples/Other/Simple2d and several from
    Examples/Image (all that use UCIFastReader).
  • Loading branch information
Alexey Reznichenko committed May 19, 2016
1 parent 2d9d1fa commit 76c4bd8
Show file tree
Hide file tree
Showing 57 changed files with 24,800 additions and 46 deletions.
230 changes: 184 additions & 46 deletions CNTK.sln

Large diffs are not rendered by default.

603 changes: 603 additions & 0 deletions Examples/Other/Simple2d/Data/SimpleDataTest_cntk_text.txt

Large diffs are not rendered by default.

10,000 changes: 10,000 additions & 0 deletions Examples/Other/Simple2d/Data/SimpleDataTrain_cntk_text.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Test runtimes

Windows:
Running test CNTKTextFormatReader/Examples/Image/MNIST/01_OneHidden (debug cpu) - [OK] 808.62 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/01_OneHidden (debug gpu) - [OK] 86.82 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/01_OneHidden (release cpu) - [OK] 49.23 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/01_OneHidden (release gpu) - [OK] 19.37 sec

Linux:
Running test CNTKTextFormatReader/Examples/Image/MNIST/01_OneHidden (debug cpu) - [OK] 170.07 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/01_OneHidden (debug gpu) - [OK] 24.82 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/01_OneHidden (release cpu) - [OK] 20.71 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/01_OneHidden (release gpu) - [OK] 8.17 sec

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

. $TEST_DIR/../run-test-common

cntkrun $CNTKTextConfigDir/01_OneHidden.cntk "train=[SGD=[maxEpochs=3]] imageLayout=\"$imageLayout\""
ExitCode=$?

# Delete the test data if copied
[[ "$Copied" -eq "1" ]] && rm -rf "$DataDir"

exit $ExitCode
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
dataDir: ../../../../../../../Examples/Image/MNIST/Data

tags:
# In BVT, run Release GPU
- bvt-e (build_sku=='gpu') and (device=='gpu') and (flavor=='release')
# In Nightly on Linux, additionally run Debug GPU and Release CPU
- nightly-e (build_sku=='gpu') and (((device=='gpu') and (flavor=='release')) or (os=='linux' and ((flavor=='debug') ^ (device=='cpu'))))

testCases:
CNTK Run must be completed:
patterns:
- __COMPLETED__

Must train epochs in exactly same order and parameters:
patterns:
- Starting Epoch {{integer}}
- learning rate per sample = {{float}}
- momentum = {{float}}

Epochs must be finished with expected results:
patterns:
- Finished Epoch[{{integer}} of {{integer}}]
- ce = {{float,tolerance=.1%}} * {{integer}}
- errTop1 = {{float,tolerance=.1%}} * {{integer}}
- err = {{float,tolerance=.1%}} * {{integer}}
- totalSamplesSeen = {{integer}}
- learningRatePerSample = {{float,tolerance=0.001%}}

Per-minibatch training results must match:
patterns:
- Epoch[{{integer}} of {{integer}}]-Minibatch[{{integer}}-{{integer}}
- ce = {{float,tolerance=.1%}} * {{integer}}
- errTop1 = {{float,tolerance=.1%}} * {{integer}}
- err = {{float,tolerance=.1%}} * {{integer}}

Final test results must match:
patterns:
- "Final Results: Minibatch[{{integer}}-{{integer}}]"
- errTop1 = {{float,tolerance=.1%}} * {{integer}}
- err = {{float,tolerance=.1%}} * {{integer}}
- ce = {{float,tolerance=.1%}} * {{integer}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Test runtimes

Windows:
Running test CNTKTextFormatReader/Examples/Image/MNIST/02_Convolution (debug gpu) - [OK] 157.53 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/02_Convolution (release gpu) - [OK] 64.93 sec

Linux:
Running test CNTKTextFormatReader/Examples/Image/MNIST/02_Convolution (debug gpu) - [OK] 40.43 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/02_Convolution (release gpu) - [OK] 18.92 sec

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

. $TEST_DIR/../run-test-common

cntkrun $CNTKTextConfigDir/02_Convolution.cntk "train=[SGD=[maxEpochs=3]] imageLayout=\"$imageLayout\""
ExitCode=$?

# Delete the test data if copied
[[ "$Copied" -eq "1" ]] && rm -rf "$DataDir"

exit $ExitCode
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
dataDir: ../../../../../../../Examples/Image/MNIST/Data

tags:
# In BVT, run Release GPU
- bvt-e (build_sku=='gpu') and (device=='gpu') and (flavor=='release')
# In Nightly on Linux, run Debug GPU in addition.
- nightly-e (build_sku=='gpu') and (device=='gpu')

testCases:
CNTK Run must be completed:
patterns:
- __COMPLETED__

Must train epochs in exactly same order and parameters:
patterns:
- Starting Epoch {{integer}}
- learning rate per sample = {{float}}
- momentum = {{float}}

# TODO destabilized by integration of 16b606c
# Epochs (with low train loss) must be finished with expected results:
# patterns:
# - Finished Epoch[{{integer}} of {{integer}}]
# - ce = {{float,tolerance=0.05}} * {{integer}}
# - err = {{float,tolerance=0.005}} * {{integer}}
# - totalSamplesSeen = {{integer}}
# - learningRatePerSample = {{float,tolerance=0.1%}}

Per-minibatch (with low train loss) training results must match:
patterns:
# Ignores first set of minibatches at start of epoch, which sometimes has a larger deviation:
- 01-
- Epoch[{{integer}} of {{integer}}]-Minibatch[{{integer}}-{{integer}}
- ce = {{float,tolerance=0.05}} * {{integer}}
- err = {{float,tolerance=0.005}} * {{integer}}

Final test results must match:
patterns:
- "Final Results: Minibatch[{{integer}}-{{integer}}]"
- err = {{float,tolerance=0.005}} * {{integer}}
- ce = {{float,tolerance=0.05}} * {{integer}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Test runtimes

Windows:
Running test CNTKTextFormatReader/Examples/Image/MNIST/03_ConvBatchNorm (debug gpu) - [OK] 214.39 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/03_ConvBatchNorm (release gpu) - [OK] 64.81 sec

Linux:
Running test CNTKTextFormatReader/Examples/Image/MNIST/03_ConvBatchNorm (debug gpu) - [OK] 44.82 sec
Running test CNTKTextFormatReader/Examples/Image/MNIST/03_ConvBatchNorm (release gpu) - [OK] 19.90 sec
Loading

0 comments on commit 76c4bd8

Please sign in to comment.