Merge branch 'master' of https://git.codeplex.com/cntk into linux-gcc
Conflicts: Common/Include/minibatchsourcehelpers.h DataReader/DSSMReader/DSSMReader.cpp DataReader/HTKMLFReader/HTKMLFReader.cpp DataReader/LMSequenceReader/SequenceReader.cpp DataReader/LMSequenceReader/minibatchsourcehelpers.h DataReader/LUSequenceReader/LUSequenceReader.cpp DataReader/LUSequenceReader/minibatchsourcehelpers.h DataReader/LibSVMBinaryReader/LibSVMBinaryReader.cpp DataReader/UCIFastReader/UCIFastReader.cpp MachineLearning/CNTK/ComputationNetwork.h MachineLearning/CNTK/SGD.h MachineLearning/CNTK/SimpleNetworkBuilder.h MachineLearning/CNTK/SynchronousExecutionEngine.h MachineLearning/cn/PTaskGraphBuilder.cpp Makefile.cpu Makefile.gpu Math/Math/NoGPU.cpp
|
@ -171,6 +171,7 @@ core
|
|||
# =========================
|
||||
# prebuild file
|
||||
# =========================
|
||||
MachineLearning/cn/buildinfo.h
|
||||
MachineLearning/CNTK/buildinfo.h
|
||||
MachineLearning/CNTK/buildinfo.h$$
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,242 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKMath", "Math\Math\Math.vcxproj", "{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517} = {B3DD765E-694E-4494-BAD7-37BBF2942517}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTK", "MachineLearning\CNTK\CNTK.vcxproj", "{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5} = {33D2FD22-DEF2-4507-A58A-368F641AEBE5}
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2} = {D667AF32-028A-4A5D-BE19-F46776F0F6B2}
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68} = {9A2F2441-5972-4EA8-9215-4119FCE0FB68}
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
{014DA766-B37B-4581-BC26-963EA5507931} = {014DA766-B37B-4581-BC26-963EA5507931}
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6} = {62836DC1-DF77-4B98-BF2D-45C943B7DDC6}
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A} = {1D5787D4-52E4-45DB-951B-82F220EE0C6A}
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1} = {E6646FFE-3588-4276-8A15-8D65C22711C1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unit Tests", "Unit Tests", "{D45DF403-6781-444E-B654-A96868C5BE68}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKMathTest", "Math\CNTKMathTest\CNTKMathTest.vcxproj", "{6CEE834A-8104-46A8-8902-64C81BD7928F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HTKMLFReader", "DataReader\HTKMLFReader\HTKMLFReader.vcxproj", "{33D2FD22-DEF2-4507-A58A-368F641AEBE5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MathPerformanceTests", "Math\MathPerformanceTests\MathPerformanceTests.vcxproj", "{668BEED5-AC07-4F35-B3AE-EE65A7F9C976}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UCIFastReader", "DataReader\UCIFastReader\UCIFastReader.vcxproj", "{E6646FFE-3588-4276-8A15-8D65C22711C1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A} = {1D5787D4-52E4-45DB-951B-82F220EE0C6A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BinaryReader", "DataReader\BinaryReader\BinaryReader.vcxproj", "{1D5787D4-52E4-45DB-951B-82F220EE0C6A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LUSequenceReader", "DataReader\LUSequenceReader\LUSequenceReader.vcxproj", "{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKEval", "MachineLearning\CNTKEval\CNTKEval.vcxproj", "{482999D1-B7E2-466E-9F8D-2119F93EAFD9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKEvalTest", "MachineLearning\CNTKEval\CNTKEvalTest\CNTKEvalTest.vcxproj", "{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9} = {482999D1-B7E2-466E-9F8D-2119F93EAFD9}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reader Plugins", "Reader Plugins", "{33EBFE78-A1A8-4961-8938-92A271941F94}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CNTK Core", "CNTK Core", "{DD043083-71A4-409A-AA91-F9C548DCF7EC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKMathCUDA", "Math\Math\CNTKMathCUDA.vcxproj", "{B3DD765E-694E-4494-BAD7-37BBF2942517}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LMSequenceReader", "DataReader\LMSequenceReader\LMSequenceReader.vcxproj", "{9A2F2441-5972-4EA8-9215-4119FCE0FB68}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSSMReader", "DataReader\DSSMReader\DSSMReader.vcxproj", "{014DA766-B37B-4581-BC26-963EA5507931}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibSVMBinaryReader", "DataReader\LibSVMBinaryReader\LibSVMBinaryReader.vcxproj", "{D667AF32-028A-4A5D-BE19-F46776F0F6B2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Linux build files", "Linux build files", "{3ED0465D-23E7-4855-9694-F788717B6533}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Makefile.cpu = Makefile.cpu
|
||||
Makefile.gpu = Makefile.gpu
|
||||
Makefile_kaldi.cpu = Makefile_kaldi.cpu
|
||||
Makefile_kaldi.gpu = Makefile_kaldi.gpu
|
||||
README = README
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentation", "{065AF55D-AF02-448B-BFCD-52619FDA4BD0}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tutorial", "Tutorial", "{98D2C32B-0C1F-4E19-A626-65F7BA4600CF}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Documentation\Tutorial\CNTK-Tutorial-ICASSP2015.pdf = Documentation\Tutorial\CNTK-Tutorial-ICASSP2015.pdf
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CNTK-TechReport", "CNTK-TechReport", "{EA67F51F-1FE8-462D-9F3E-01161685AD59}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documents", "Documents", "{DE1A06BA-EC5C-4E0D-BCA8-3EA555310C58}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Documentation\Documents\Configuration Files.docx = Documentation\Documents\Configuration Files.docx
|
||||
Documentation\Documents\External Buffer Behavior.docx = Documentation\Documents\External Buffer Behavior.docx
|
||||
Documentation\Documents\Model Editing Language.docx = Documentation\Documents\Model Editing Language.docx
|
||||
Documentation\Documents\Network Description Language.docx = Documentation\Documents\Network Description Language.docx
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "License", "License", "{63024704-A2D7-497E-AD4B-5C10C6AA1374}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
license\MSR Computational Network Toolkit_MSR-LA (2014-03-28).docx = license\MSR Computational Network Toolkit_MSR-LA (2014-03-28).docx
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lyx", "lyx", "{F9BEB27E-8AF5-464E-8D45-0000D5AFA2D3}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Documentation\CNTK-TechReport\lyx\#CNTKBook_CNTK_Programmer_Chapter.lyx# = Documentation\CNTK-TechReport\lyx\#CNTKBook_CNTK_Programmer_Chapter.lyx#
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook-20150513.pdf = Documentation\CNTK-TechReport\lyx\CNTKBook-20150513.pdf
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook-master.lyx = Documentation\CNTK-TechReport\lyx\CNTKBook-master.lyx
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook_Abstract.lyx = Documentation\CNTK-TechReport\lyx\CNTKBook_Abstract.lyx
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook_ASRDecoder_Chapter.lyx = Documentation\CNTK-TechReport\lyx\CNTKBook_ASRDecoder_Chapter.lyx
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook_CN_Chapter.lyx = Documentation\CNTK-TechReport\lyx\CNTKBook_CN_Chapter.lyx
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook_CNTK_Adv_Chapter.lyx = Documentation\CNTK-TechReport\lyx\CNTKBook_CNTK_Adv_Chapter.lyx
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook_CNTK_Chapter.lyx = Documentation\CNTK-TechReport\lyx\CNTKBook_CNTK_Chapter.lyx
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook_CNTK_Programmer_Chapter.lyx = Documentation\CNTK-TechReport\lyx\CNTKBook_CNTK_Programmer_Chapter.lyx
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook_ExampleSetup_Chapter.lyx = Documentation\CNTK-TechReport\lyx\CNTKBook_ExampleSetup_Chapter.lyx
|
||||
Documentation\CNTK-TechReport\lyx\CNTKBook_Introduction.lyx = Documentation\CNTK-TechReport\lyx\CNTKBook_Introduction.lyx
|
||||
Documentation\CNTK-TechReport\lyx\references.bib = Documentation\CNTK-TechReport\lyx\references.bib
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "figures", "figures", "{889C1CCF-92B3-450B-B00D-FC9A9D5BE464}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Documentation\CNTK-TechReport\figures\CN+TrainingCriterion.pdf = Documentation\CNTK-TechReport\figures\CN+TrainingCriterion.pdf
|
||||
Documentation\CNTK-TechReport\figures\CN+TrainingCriterion.png = Documentation\CNTK-TechReport\figures\CN+TrainingCriterion.png
|
||||
Documentation\CNTK-TechReport\figures\CN-1HiddenNN.pdf = Documentation\CNTK-TechReport\figures\CN-1HiddenNN.pdf
|
||||
Documentation\CNTK-TechReport\figures\CN-1HiddenNN.png = Documentation\CNTK-TechReport\figures\CN-1HiddenNN.png
|
||||
Documentation\CNTK-TechReport\figures\CN-2Inputs.pdf = Documentation\CNTK-TechReport\figures\CN-2Inputs.pdf
|
||||
Documentation\CNTK-TechReport\figures\CN-2Inputs.png = Documentation\CNTK-TechReport\figures\CN-2Inputs.png
|
||||
Documentation\CNTK-TechReport\figures\CN-EfficientGradient.pdf = Documentation\CNTK-TechReport\figures\CN-EfficientGradient.pdf
|
||||
Documentation\CNTK-TechReport\figures\CN-EfficientGradient.png = Documentation\CNTK-TechReport\figures\CN-EfficientGradient.png
|
||||
Documentation\CNTK-TechReport\figures\CN-NaiveGradient.pdf = Documentation\CNTK-TechReport\figures\CN-NaiveGradient.pdf
|
||||
Documentation\CNTK-TechReport\figures\CN-NaiveGradient.png = Documentation\CNTK-TechReport\figures\CN-NaiveGradient.png
|
||||
Documentation\CNTK-TechReport\figures\CN-ShareWeight.pdf = Documentation\CNTK-TechReport\figures\CN-ShareWeight.pdf
|
||||
Documentation\CNTK-TechReport\figures\CN-ShareWeight.png = Documentation\CNTK-TechReport\figures\CN-ShareWeight.png
|
||||
Documentation\CNTK-TechReport\figures\CN-WithDelayNode.pdf = Documentation\CNTK-TechReport\figures\CN-WithDelayNode.pdf
|
||||
Documentation\CNTK-TechReport\figures\CN-WithDelayNode.png = Documentation\CNTK-TechReport\figures\CN-WithDelayNode.png
|
||||
Documentation\CNTK-TechReport\figures\CNNComputation.pdf = Documentation\CNTK-TechReport\figures\CNNComputation.pdf
|
||||
Documentation\CNTK-TechReport\figures\CNNComputation.png = Documentation\CNTK-TechReport\figures\CNNComputation.png
|
||||
Documentation\CNTK-TechReport\figures\CNTKArch.pdf = Documentation\CNTK-TechReport\figures\CNTKArch.pdf
|
||||
Documentation\CNTK-TechReport\figures\CNTKArch.png = Documentation\CNTK-TechReport\figures\CNTKArch.png
|
||||
Documentation\CNTK-TechReport\figures\ConfusionData1.png = Documentation\CNTK-TechReport\figures\ConfusionData1.png
|
||||
Documentation\CNTK-TechReport\figures\ConfusionData100.png = Documentation\CNTK-TechReport\figures\ConfusionData100.png
|
||||
Documentation\CNTK-TechReport\figures\SequenceBatch.pdf = Documentation\CNTK-TechReport\figures\SequenceBatch.pdf
|
||||
Documentation\CNTK-TechReport\figures\SequenceBatch.png = Documentation\CNTK-TechReport\figures\SequenceBatch.png
|
||||
Documentation\CNTK-TechReport\figures\SimpleDemoDataReference.png = Documentation\CNTK-TechReport\figures\SimpleDemoDataReference.png
|
||||
Documentation\CNTK-TechReport\figures\SimpleDemoErrorRateReference.png = Documentation\CNTK-TechReport\figures\SimpleDemoErrorRateReference.png
|
||||
Documentation\CNTK-TechReport\figures\SimpleDemoOutputReference.png = Documentation\CNTK-TechReport\figures\SimpleDemoOutputReference.png
|
||||
Documentation\CNTK-TechReport\figures\simpleRNN.png = Documentation\CNTK-TechReport\figures\simpleRNN.png
|
||||
Documentation\CNTK-TechReport\figures\SpeechErrorRate.png = Documentation\CNTK-TechReport\figures\SpeechErrorRate.png
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Other", "Other", "{39E42C4B-A078-4CA4-9D92-B883D8129601}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}.Debug|x64.Build.0 = Debug|x64
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}.Release|x64.ActiveCfg = Release|x64
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}.Release|x64.Build.0 = Release|x64
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}.Debug|x64.Build.0 = Debug|x64
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}.Release|x64.ActiveCfg = Release|x64
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}.Release|x64.Build.0 = Release|x64
|
||||
{6CEE834A-8104-46A8-8902-64C81BD7928F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6CEE834A-8104-46A8-8902-64C81BD7928F}.Debug|x64.Build.0 = Debug|x64
|
||||
{6CEE834A-8104-46A8-8902-64C81BD7928F}.Release|x64.ActiveCfg = Release|x64
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5}.Debug|x64.Build.0 = Debug|x64
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5}.Release|x64.ActiveCfg = Release|x64
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5}.Release|x64.Build.0 = Release|x64
|
||||
{668BEED5-AC07-4F35-B3AE-EE65A7F9C976}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{668BEED5-AC07-4F35-B3AE-EE65A7F9C976}.Debug|x64.Build.0 = Debug|x64
|
||||
{668BEED5-AC07-4F35-B3AE-EE65A7F9C976}.Release|x64.ActiveCfg = Release|x64
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1}.Debug|x64.Build.0 = Debug|x64
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1}.Release|x64.ActiveCfg = Release|x64
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1}.Release|x64.Build.0 = Release|x64
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A}.Debug|x64.Build.0 = Debug|x64
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A}.Release|x64.ActiveCfg = Release|x64
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A}.Release|x64.Build.0 = Release|x64
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}.Debug|x64.Build.0 = Debug|x64
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}.Release|x64.ActiveCfg = Release|x64
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}.Release|x64.Build.0 = Release|x64
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9}.Debug|x64.Build.0 = Debug|x64
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9}.Release|x64.ActiveCfg = Release|x64
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9}.Release|x64.Build.0 = Release|x64
|
||||
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}.Debug|x64.Build.0 = Debug|x64
|
||||
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}.Release|x64.ActiveCfg = Release|x64
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Debug|x64.Build.0 = Debug|x64
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Release|x64.ActiveCfg = Release|x64
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Release|x64.Build.0 = Release|x64
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68}.Debug|x64.Build.0 = Debug|x64
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68}.Release|x64.ActiveCfg = Release|x64
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68}.Release|x64.Build.0 = Release|x64
|
||||
{014DA766-B37B-4581-BC26-963EA5507931}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{014DA766-B37B-4581-BC26-963EA5507931}.Debug|x64.Build.0 = Debug|x64
|
||||
{014DA766-B37B-4581-BC26-963EA5507931}.Release|x64.ActiveCfg = Release|x64
|
||||
{014DA766-B37B-4581-BC26-963EA5507931}.Release|x64.Build.0 = Release|x64
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2}.Debug|x64.Build.0 = Debug|x64
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2}.Release|x64.ActiveCfg = Release|x64
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
|
||||
{6CEE834A-8104-46A8-8902-64C81BD7928F} = {D45DF403-6781-444E-B654-A96868C5BE68}
|
||||
{668BEED5-AC07-4F35-B3AE-EE65A7F9C976} = {D45DF403-6781-444E-B654-A96868C5BE68}
|
||||
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC} = {D45DF403-6781-444E-B654-A96868C5BE68}
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{014DA766-B37B-4581-BC26-963EA5507931} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{3ED0465D-23E7-4855-9694-F788717B6533} = {39E42C4B-A078-4CA4-9D92-B883D8129601}
|
||||
{98D2C32B-0C1F-4E19-A626-65F7BA4600CF} = {065AF55D-AF02-448B-BFCD-52619FDA4BD0}
|
||||
{EA67F51F-1FE8-462D-9F3E-01161685AD59} = {065AF55D-AF02-448B-BFCD-52619FDA4BD0}
|
||||
{DE1A06BA-EC5C-4E0D-BCA8-3EA555310C58} = {065AF55D-AF02-448B-BFCD-52619FDA4BD0}
|
||||
{63024704-A2D7-497E-AD4B-5C10C6AA1374} = {065AF55D-AF02-448B-BFCD-52619FDA4BD0}
|
||||
{F9BEB27E-8AF5-464E-8D45-0000D5AFA2D3} = {EA67F51F-1FE8-462D-9F3E-01161685AD59}
|
||||
{889C1CCF-92B3-450B-B00D-FC9A9D5BE464} = {EA67F51F-1FE8-462D-9F3E-01161685AD59}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,154 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKMath", "..\Math\Math\Math.vcxproj", "{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517} = {B3DD765E-694E-4494-BAD7-37BBF2942517}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cn", "..\MachineLearning\cn\cn.vcxproj", "{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5} = {33D2FD22-DEF2-4507-A58A-368F641AEBE5}
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68} = {9A2F2441-5972-4EA8-9215-4119FCE0FB68}
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517} = {B3DD765E-694E-4494-BAD7-37BBF2942517}
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6} = {62836DC1-DF77-4B98-BF2D-45C943B7DDC6}
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A} = {1D5787D4-52E4-45DB-951B-82F220EE0C6A}
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1} = {E6646FFE-3588-4276-8A15-8D65C22711C1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unit Tests", "Unit Tests", "{D45DF403-6781-444E-B654-A96868C5BE68}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKMathTest", "..\Math\CNTKMathTest\CNTKMathTest.vcxproj", "{6CEE834A-8104-46A8-8902-64C81BD7928F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HTKMLFReader", "..\DataReader\HTKMLFReader\HTKMLFReader.vcxproj", "{33D2FD22-DEF2-4507-A58A-368F641AEBE5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MathPerformanceTests", "..\Math\MathPerformanceTests\MathPerformanceTests.vcxproj", "{668BEED5-AC07-4F35-B3AE-EE65A7F9C976}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UCIFastReader", "..\DataReader\UCIFastReader\UCIFastReader.vcxproj", "{E6646FFE-3588-4276-8A15-8D65C22711C1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A} = {1D5787D4-52E4-45DB-951B-82F220EE0C6A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BinaryReader", "..\DataReader\BinaryReader\BinaryReader.vcxproj", "{1D5787D4-52E4-45DB-951B-82F220EE0C6A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LUSequenceReader", "..\DataReader\LUSequenceReader\LUSequenceReader.vcxproj", "{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKEval", "..\MachineLearning\CNTKEval\CNTKEval.vcxproj", "{482999D1-B7E2-466E-9F8D-2119F93EAFD9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKEvalTest", "..\MachineLearning\CNTKEval\CNTKEvalTest\CNTKEvalTest.vcxproj", "{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9} = {482999D1-B7E2-466E-9F8D-2119F93EAFD9}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reader Plugins", "Reader Plugins", "{33EBFE78-A1A8-4961-8938-92A271941F94}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CNTK", "CNTK", "{DD043083-71A4-409A-AA91-F9C548DCF7EC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKMathCUDA", "..\Math\Math\CNTKMathCUDA.vcxproj", "{B3DD765E-694E-4494-BAD7-37BBF2942517}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LMSequenceReader", "..\DataReader\LMSequenceReader\LMSequenceReader.vcxproj", "{9A2F2441-5972-4EA8-9215-4119FCE0FB68}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DSSMReader", "..\DataReader\DSSMReader\DSSMReader.vcxproj", "{014DA766-B37B-4581-BC26-963EA5507931}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibSVMBinaryReader", "..\DataReader\LibSVMBinaryReader\LibSVMBinaryReader.vcxproj", "{D667AF32-028A-4A5D-BE19-F46776F0F6B2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}.Debug|x64.Build.0 = Debug|x64
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}.Release|x64.ActiveCfg = Release|x64
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}.Release|x64.Build.0 = Release|x64
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}.Debug|x64.Build.0 = Debug|x64
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}.Release|x64.ActiveCfg = Release|x64
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}.Release|x64.Build.0 = Release|x64
|
||||
{6CEE834A-8104-46A8-8902-64C81BD7928F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6CEE834A-8104-46A8-8902-64C81BD7928F}.Debug|x64.Build.0 = Debug|x64
|
||||
{6CEE834A-8104-46A8-8902-64C81BD7928F}.Release|x64.ActiveCfg = Release|x64
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5}.Debug|x64.Build.0 = Debug|x64
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5}.Release|x64.ActiveCfg = Release|x64
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5}.Release|x64.Build.0 = Release|x64
|
||||
{668BEED5-AC07-4F35-B3AE-EE65A7F9C976}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{668BEED5-AC07-4F35-B3AE-EE65A7F9C976}.Debug|x64.Build.0 = Debug|x64
|
||||
{668BEED5-AC07-4F35-B3AE-EE65A7F9C976}.Release|x64.ActiveCfg = Release|x64
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1}.Debug|x64.Build.0 = Debug|x64
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1}.Release|x64.ActiveCfg = Release|x64
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1}.Release|x64.Build.0 = Release|x64
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A}.Debug|x64.Build.0 = Debug|x64
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A}.Release|x64.ActiveCfg = Release|x64
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A}.Release|x64.Build.0 = Release|x64
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}.Debug|x64.Build.0 = Debug|x64
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}.Release|x64.ActiveCfg = Release|x64
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6}.Release|x64.Build.0 = Release|x64
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9}.Debug|x64.Build.0 = Debug|x64
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9}.Release|x64.ActiveCfg = Release|x64
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9}.Release|x64.Build.0 = Release|x64
|
||||
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}.Debug|x64.Build.0 = Debug|x64
|
||||
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}.Release|x64.ActiveCfg = Release|x64
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Debug|x64.Build.0 = Debug|x64
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Release|x64.ActiveCfg = Release|x64
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Release|x64.Build.0 = Release|x64
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68}.Debug|x64.Build.0 = Debug|x64
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68}.Release|x64.ActiveCfg = Release|x64
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68}.Release|x64.Build.0 = Release|x64
|
||||
{014DA766-B37B-4581-BC26-963EA5507931}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{014DA766-B37B-4581-BC26-963EA5507931}.Debug|x64.Build.0 = Debug|x64
|
||||
{014DA766-B37B-4581-BC26-963EA5507931}.Release|x64.ActiveCfg = Release|x64
|
||||
{014DA766-B37B-4581-BC26-963EA5507931}.Release|x64.Build.0 = Release|x64
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2}.Debug|x64.Build.0 = Debug|x64
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2}.Release|x64.ActiveCfg = Release|x64
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
|
||||
{482999D1-B7E2-466E-9F8D-2119F93EAFD9} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
|
||||
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
|
||||
{B3DD765E-694E-4494-BAD7-37BBF2942517} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
|
||||
{6CEE834A-8104-46A8-8902-64C81BD7928F} = {D45DF403-6781-444E-B654-A96868C5BE68}
|
||||
{668BEED5-AC07-4F35-B3AE-EE65A7F9C976} = {D45DF403-6781-444E-B654-A96868C5BE68}
|
||||
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC} = {D45DF403-6781-444E-B654-A96868C5BE68}
|
||||
{E6646FFE-3588-4276-8A15-8D65C22711C1} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{1D5787D4-52E4-45DB-951B-82F220EE0C6A} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{62836DC1-DF77-4B98-BF2D-45C943B7DDC6} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{33D2FD22-DEF2-4507-A58A-368F641AEBE5} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{9A2F2441-5972-4EA8-9215-4119FCE0FB68} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{014DA766-B37B-4581-BC26-963EA5507931} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
{D667AF32-028A-4A5D-BE19-F46776F0F6B2} = {33EBFE78-A1A8-4961-8938-92A271941F94}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -4,7 +4,7 @@ These scripts are similar to those in the TIMIT folder of the ExampleSetups exce
|
|||
The globals_cpu.config and globals_gpu.config differ only in which device they use and where the results are stored.
|
||||
|
||||
To test on CPU:
|
||||
cn.exe configFile=globals_cpu.config+<DesiredConfigFile>
|
||||
cntk configFile=globals_cpu.config+<DesiredConfigFile>
|
||||
|
||||
To test on GPU:
|
||||
cn.exe configFile=globals_gpu.config+<DesiredConfigFile>
|
||||
cntk configFile=globals_gpu.config+<DesiredConfigFile>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
set cnpath=d:\gitroot\cntk\CNTKSolution\x64\Release
|
||||
set proc=%1
|
||||
echo on
|
||||
%cnpath%\cn.exe configFile=globals_%proc%.config+TIMIT_TrainSimpleNetwork.config
|
||||
%cnpath%\cn.exe configFile=globals_%proc%.config+TIMIT_TrainNDLNetwork.config
|
||||
%cnpath%\cn.exe configFile=globals_%proc%.config+TIMIT_TrainAutoEncoder.config
|
||||
%cnpath%\cn.exe configFile=globals_%proc%.config+TIMIT_TrainMultiInput.config
|
||||
%cnpath%\cn.exe configFile=globals_%proc%.config+TIMIT_TrainMultiTask.config
|
||||
%cnpath%\cn.exe configFile=globals_%proc%.config+TIMIT_EvalSimpleNetwork.config
|
||||
%cnpath%\cn.exe configFile=globals_%proc%.config+TIMIT_WriteScaledLogLike.config
|
||||
%cnpath%\cn.exe configFile=globals_%proc%.config+TIMIT_WriteBottleneck.config
|
||||
%cnpath%\cntk configFile=globals_%proc%.config+TIMIT_TrainSimpleNetwork.config
|
||||
%cnpath%\cntk configFile=globals_%proc%.config+TIMIT_TrainNDLNetwork.config
|
||||
%cnpath%\cntk configFile=globals_%proc%.config+TIMIT_TrainAutoEncoder.config
|
||||
%cnpath%\cntk configFile=globals_%proc%.config+TIMIT_TrainMultiInput.config
|
||||
%cnpath%\cntk configFile=globals_%proc%.config+TIMIT_TrainMultiTask.config
|
||||
%cnpath%\cntk configFile=globals_%proc%.config+TIMIT_EvalSimpleNetwork.config
|
||||
%cnpath%\cntk configFile=globals_%proc%.config+TIMIT_WriteScaledLogLike.config
|
||||
%cnpath%\cntk configFile=globals_%proc%.config+TIMIT_WriteBottleneck.config
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
C:\dev\cntk3\CNTKSolution\x64\Release\cn.exe configFile=globals.config+rnnlu.config
|
||||
C:\dev\cntk3\CNTKSolution\x64\Release\cntk configFile=globals.config+rnnlu.config
|
||||
|
||||
|
||||
# expected results, which has a copy at Expected.log is
|
||||
|
@ -11,6 +11,6 @@ Finished Epoch[3]: [Training Set] Train Loss Per Sample = 3.6568716 EvalErr P
|
|||
Finished Epoch[3]: [Validation Set] Train Loss Per Sample = 2.6959986 EvalErr Per Sample = 2.6959986
|
||||
|
||||
del /q c:\temp\exp\atis
|
||||
C:\dev\cntk3\CNTKSolution\x64\Release\cn.exe configFile=globals.config+rnnlu.ndl.config
|
||||
C:\dev\cntk3\CNTKSolution\x64\Release\cntk configFile=globals.config+rnnlu.ndl.config
|
||||
#should have the same output as above using simple network builder.
|
||||
|
||||
|
|
|
@ -4,15 +4,21 @@
|
|||
// </copyright>
|
||||
//
|
||||
|
||||
// This file requires the NVML library. Unfortunately, this library does not install an environment variable for locating it.
|
||||
// On Windows, the SDK gets installed to "c:\Program Files\NVIDIA Corporation\GDK\gdk_win7_amd64_release\nvml" (/include, /lib).
|
||||
// From the SDK documentation:
|
||||
// "The NVML library can be found at: %ProgramW6432%\"NVIDIA Corporation"\NVSMI\ on Windows, but will not be added to the path. To dynamically link to NVML, add this path to the PATH environmental variable. To dynamically load NVML, call LoadLibrary with this path."
|
||||
// "On Linux the NVML library will be found on the standard library path. For 64-bit Linux, both the 32-bit and 64-bit NVML libraries will be installed."
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
|
||||
#include "Platform.h"
|
||||
#include "BestGpu.h"
|
||||
#include "commandArgUtil.h" // for ConfigParameters
|
||||
#ifndef CPUONLY
|
||||
#pragma comment (lib, "cudart.lib")
|
||||
#pragma comment (lib, "nvml.lib")
|
||||
#include <cuda_runtime.h>
|
||||
#include <nvml.h>
|
||||
#include <nvml.h> // note: expected at "c:\Program Files\NVIDIA Corporation\GDK\gdk_win7_amd64_release\nvml\include" (Windows)
|
||||
#pragma comment (lib, "nvml.lib") // note: expected at "c:\Program Files\NVIDIA Corporation\GDK\gdk_win7_amd64_release\nvml\lib" (Windows)
|
||||
#include <vector>
|
||||
#endif
|
||||
#include "CommonMatrix.h" // for CPUDEVICE and AUTOPLACEMATRIX
|
||||
|
@ -63,11 +69,15 @@ enum BestGpuFlags
|
|||
bestGpuFavorMemory = 2, // favor memory
|
||||
bestGpuFavorUtilization = 4, // favor low utilization
|
||||
bestGpuFavorSpeed = 8, // favor fastest processor
|
||||
bestGpuExclusiveLock = 16, // obtain mutex for selected GPU
|
||||
bestGpuRequery = 256, // rerun the last query, updating statistics
|
||||
};
|
||||
|
||||
class BestGpu
|
||||
{
|
||||
#ifdef WIN32
|
||||
std::map<int, HANDLE> m_GPUMutex;
|
||||
#endif
|
||||
private:
|
||||
bool m_initialized; // initialized
|
||||
bool m_nvmlData; // nvml Data is valid
|
||||
|
@ -99,6 +109,7 @@ public:
|
|||
static const int AllDevices = -1; // can be used to specify all GPUs in GetDevices() call
|
||||
static const int RequeryDevices = -2; // Requery refreshing statistics and picking the same number as last query
|
||||
std::vector<int> GetDevices(int number = AllDevices, BestGpuFlags flags = bestGpuNormal ); // get multiple devices
|
||||
private:
|
||||
bool LockDevice(int deviceID, bool trial=true);
|
||||
};
|
||||
|
||||
|
@ -167,49 +178,22 @@ DEVICEID_TYPE DeviceFromConfig(const ConfigParameters& config)
|
|||
}
|
||||
}
|
||||
#else
|
||||
std::vector<int> devices = g_bestGpu->GetDevices(1, bestGpuAvoidSharing);
|
||||
// to return a vector of AVAILABLE devices and sorted by score
|
||||
deviceId = (DEVICEID_TYPE)devices[0];
|
||||
if (bLockGPU)
|
||||
{
|
||||
if (!g_bestGpu->LockDevice(deviceId, false)) // formally lock it
|
||||
{
|
||||
string message = msra::strfun::strprintf("DeviceFromConfig: Cannot capture and lock Device %d\n", deviceId);
|
||||
throw std::runtime_error(message.c_str());
|
||||
}
|
||||
}
|
||||
deviceId = (DEVICEID_TYPE)
|
||||
g_bestGpu->GetDevice(BestGpuFlags(bLockGPU ? (bestGpuAvoidSharing | bestGpuExclusiveLock) : bestGpuAvoidSharing));
|
||||
#endif
|
||||
}
|
||||
else if (!_stricmp(val.c_str(), "All"))
|
||||
{
|
||||
std::vector<int> devices = g_bestGpu->GetDevices(BestGpu::AllDevices, bestGpuNormal);
|
||||
std::vector<int> devices =
|
||||
g_bestGpu->GetDevices(BestGpu::AllDevices, BestGpuFlags(bLockGPU ? bestGpuNormal | bestGpuExclusiveLock : bestGpuNormal));
|
||||
deviceId = (DEVICEID_TYPE)devices[0];
|
||||
if (bLockGPU) {
|
||||
for (auto i : devices)
|
||||
{
|
||||
if (!g_bestGpu->LockDevice(i, false))
|
||||
{
|
||||
string message = msra::strfun::strprintf("DeviceFromConfig: Cannot capture and lock Device %d\n", i);
|
||||
throw std::runtime_error(message.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (val.size() == 2 && val[0] == '*' && isdigit(val[1]))
|
||||
{
|
||||
int number = (int)(val[1] - '0');
|
||||
std::vector<int> devices = g_bestGpu->GetDevices(number, bestGpuNormal);
|
||||
std::vector<int> devices =
|
||||
g_bestGpu->GetDevices(number, BestGpuFlags(bLockGPU ? bestGpuNormal | bestGpuExclusiveLock : bestGpuNormal));
|
||||
deviceId = (DEVICEID_TYPE)devices[0];
|
||||
if (bLockGPU){
|
||||
for (size_t i = 0; i < number; i++)
|
||||
{
|
||||
if (!g_bestGpu->LockDevice((int)i, false))
|
||||
{
|
||||
string message = msra::strfun::strprintf("DeviceFromConfig: Cannot capture and lock Device %d\n", i);
|
||||
throw std::runtime_error(message.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -222,19 +206,10 @@ DEVICEID_TYPE DeviceFromConfig(const ConfigParameters& config)
|
|||
{
|
||||
argvector<int> allowed = arr;
|
||||
g_bestGpu->SetAllowedDevices(allowed);
|
||||
std::vector<int> devices = g_bestGpu->GetDevices(BestGpu::AllDevices, bestGpuNormal);
|
||||
|
||||
std::vector<int> devices =
|
||||
g_bestGpu->GetDevices(BestGpu::AllDevices, BestGpuFlags(bLockGPU ? bestGpuNormal | bestGpuExclusiveLock : bestGpuNormal));
|
||||
deviceId = (DEVICEID_TYPE)devices[0];
|
||||
if (bLockGPU)
|
||||
{
|
||||
for (auto i : devices)
|
||||
{
|
||||
if (!g_bestGpu->LockDevice(i, false))
|
||||
{
|
||||
string message = msra::strfun::strprintf("DeviceFromConfig: Cannot capture and lock Device %d\n", i);
|
||||
throw std::runtime_error(message.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return deviceId;
|
||||
|
@ -310,8 +285,17 @@ void BestGpu::Init()
|
|||
return;
|
||||
|
||||
//get the count of objects
|
||||
//cudaError_t err =
|
||||
cudaError_t err =
|
||||
cudaGetDeviceCount(&m_deviceCount);
|
||||
// TODO: use CUDA_CALL here
|
||||
if (err != cudaSuccess)
|
||||
{
|
||||
const char* errmsg = cudaGetErrorString(err);
|
||||
fprintf(stderr, "!!!!!!!!CUDA EXCEPTION: %s\n", errmsg);
|
||||
throw std::runtime_error(errmsg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ProcessorData pdEmpty = { 0 };
|
||||
for (int i = 0; i < m_deviceCount; i++)
|
||||
|
@ -342,6 +326,12 @@ BestGpu::~BestGpu()
|
|||
{
|
||||
nvmlShutdown();
|
||||
}
|
||||
#ifdef WIN32
|
||||
for (auto it : m_GPUMutex)
|
||||
{
|
||||
::CloseHandle(it.second);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// GetNvmlData - Get data from the Nvidia Management Library
|
||||
|
@ -504,7 +494,18 @@ std::vector<int> BestGpu::GetDevices(int number, BestGpuFlags p_bestFlags)
|
|||
break;
|
||||
}
|
||||
|
||||
{
|
||||
#ifdef WIN32
|
||||
// this code allows only one process to run concurrently on a machine
|
||||
wchar_t buffer[80];
|
||||
wsprintf(buffer, L"Global\\DBN.exe GPGPU querying lock");
|
||||
HANDLE h = ::CreateMutex(NULL, FALSE, buffer);
|
||||
if (h == NULL) // failure --this should not really happen
|
||||
throw std::runtime_error("DeviceFromConfig: unexpected failure");
|
||||
if (bestFlags & bestGpuExclusiveLock) // only wait if we will be locking devices
|
||||
::WaitForSingleObject(h, INFINITE);
|
||||
#endif
|
||||
|
||||
{
|
||||
// even if user do not want to lock the GPU, we still need to check whether a particular GPU is locked or not,
|
||||
// to respect other users' exclusive lock.
|
||||
|
||||
|
@ -534,6 +535,17 @@ std::vector<int> BestGpu::GetDevices(int number, BestGpuFlags p_bestFlags)
|
|||
best.push_back(-1);
|
||||
}
|
||||
|
||||
for (int z = 0; z<best.size() && z < number; z++)
|
||||
{
|
||||
LockDevice(best[z], false);
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
// we have our device - let other processors play now
|
||||
::ReleaseMutex(h);
|
||||
::CloseHandle(h);
|
||||
#endif
|
||||
|
||||
return best; // return the array of the best GPUs
|
||||
}
|
||||
|
||||
|
@ -680,6 +692,7 @@ bool BestGpu::LockDevice(int deviceID, bool trial)
|
|||
{
|
||||
fprintf(stderr, "LockDevice: Capture device %d and lock it for exclusive use\n", deviceID);
|
||||
}
|
||||
m_GPUMutex[deviceID] = h;
|
||||
return true;
|
||||
}
|
||||
::CloseHandle(h);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "stdafx.h"
|
||||
#define DATAREADER_LOCAL
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include "DataReader.h"
|
||||
|
||||
namespace Microsoft { namespace MSR { namespace CNTK {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#define EVAL_LOCAL
|
||||
#include "Eval.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
|
||||
#endif
|
||||
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#define FORMAT_SPECIALIZE // to get the specialized version of the format routines
|
||||
#include "fileutil.h"
|
||||
#include "File.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include "fileutil.h"
|
||||
#include "FileTest.h"
|
||||
#include "File.h"
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
// Basics.h -- some shared generally useful pieces of code used by CNTK
|
||||
//
|
||||
// We also include a simple "emulation" layer for some proprietary MSVC CRT functions.
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _BASICS_H_
|
||||
#define _BASICS_H_
|
||||
|
||||
#include "basetypes.h" // TODO: gradually move over here all that's needed of basetypes.h, then remove basetypes.h.
|
||||
|
||||
#define TWO_PI 6.283185307f // TODO: find the official standards-confirming definition of this and use it instead
|
||||
|
||||
// ===========================================================================
|
||||
// emulation of some MSVC proprietary CRT
|
||||
// ===========================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
static inline int _wsystem(const wchar_t *command) { return system(msra::strfun::utf8(command).c_str()); }
|
||||
#endif
|
||||
|
||||
#endif // _BASICS_H_
|
|
@ -25,7 +25,7 @@
|
|||
#include "Matrix.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include "commandArgUtil.h"
|
||||
|
||||
namespace Microsoft { namespace MSR { namespace CNTK {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#define DATAWRITER_API
|
||||
#endif
|
||||
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include "Matrix.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#define EVAL_API
|
||||
#endif
|
||||
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
@ -68,8 +68,6 @@ class Eval : public IEvaluateModel<ElemType>, protected Plugin
|
|||
private:
|
||||
IEvaluateModel<ElemType> *m_eval; // evaluation class pointer
|
||||
|
||||
virtual void Init(const std::string& config);
|
||||
|
||||
void GetEvalClass(const std::string& config);
|
||||
|
||||
// Destroy - cleanup and remove this class
|
||||
|
@ -98,7 +96,7 @@ public:
|
|||
// inputs - map from node name to input vector
|
||||
// outputs - map from node name to output vector, outputs vectors need to be preallocated by caller, sizing will happen during evaluation
|
||||
virtual void Evaluate(std::map<std::wstring, std::vector<ElemType>*>& inputs, std::map<std::wstring, std::vector<ElemType>*>& outputs);
|
||||
|
||||
virtual void Init(const std::string& config);
|
||||
virtual void ResetState();
|
||||
};
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// </copyright>
|
||||
//
|
||||
#pragma once
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
|
@ -18,7 +18,7 @@
|
|||
#endif
|
||||
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
|
||||
#endif
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include "fileutil.h"
|
||||
#ifdef __unix__
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -32,25 +24,12 @@
|
|||
<RootNamespace>UCIReader</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
|
@ -61,54 +40,25 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\Math\Math;..\..\Common\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\Math\Math;..\..\Common\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;UCIREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>CNTKmath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
|
@ -126,26 +76,6 @@
|
|||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\;..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UCIREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>CNTKmath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
<Profile>true</Profile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -194,30 +124,21 @@
|
|||
<ClCompile Include="..\..\Common\fileutil.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="BinaryFile.cpp" />
|
||||
<ClCompile Include="BinaryReader.cpp" />
|
||||
<ClCompile Include="BinaryWriter.cpp" />
|
||||
<ClCompile Include="Exports.cpp" />
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</PrecompiledHeader>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#define DATAWRITER_EXPORTS // creating the exports here
|
||||
#include "DataWriter.h"
|
||||
#include "BinaryReader.h"
|
||||
|
|
|
@ -94,12 +94,12 @@ void DSSMReader<ElemType>::WriteLabelFile()
|
|||
{
|
||||
labelFile << m_mapIdToLabel[i] << '\n';
|
||||
}
|
||||
fprintf(stderr, "label file %S written to disk\n", m_labelFileToWrite.c_str());
|
||||
fprintf(stderr, "label file %ls written to disk\n", m_labelFileToWrite.c_str());
|
||||
m_labelFileToWrite.clear();
|
||||
}
|
||||
else if (!m_cachingWriter)
|
||||
{
|
||||
fprintf(stderr, "WARNING: file %S NOT written to disk yet, will be written the first time the end of the entire dataset is found.\n", m_labelFileToWrite.c_str());
|
||||
fprintf(stderr, "WARNING: file %ls NOT written to disk yet, will be written the first time the end of the entire dataset is found.\n", m_labelFileToWrite.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -32,25 +24,12 @@
|
|||
<RootNamespace>DSSMReader</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
|
@ -61,55 +40,26 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\Math\Math;..\..\Common\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>c:\Program Files\Microsoft MPI\Inc;..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>c:\Program Files\Microsoft MPI\Lib\amd64;$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DSSMREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>CNTKmath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
|
@ -128,26 +78,6 @@
|
|||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\;..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;_USRDLL;DSSMREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>CNTKmath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\math\$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<Profile>true</Profile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -179,7 +109,6 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\File.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\fileutil.h">
|
||||
|
@ -194,7 +123,6 @@
|
|||
<ClCompile Include="..\..\Common\ConfigFile.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\Common\DataReader.cpp" />
|
||||
<ClCompile Include="..\..\Common\DataWriter.cpp">
|
||||
|
@ -203,13 +131,10 @@
|
|||
<ClCompile Include="..\..\Common\File.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\Common\fileutil.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="DSSMReader.cpp" />
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
//
|
||||
// <copyright file="minibatchsourcehelpers.h" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//
|
||||
// minibatchsourcehelpers.h -- helper classes for minibatch sources
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "basetypes.h"
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace msra { namespace dbn {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// randomordering -- class to help manage randomization of input data
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static inline size_t rand (const size_t begin, const size_t end)
|
||||
{
|
||||
const size_t randno = ::rand() * RAND_MAX + ::rand(); // BUGBUG: still only covers 32-bit range
|
||||
return begin + randno % (end - begin);
|
||||
}
|
||||
|
||||
class randomordering // note: NOT thread-safe at all
|
||||
{
|
||||
// constants for randomization
|
||||
const static size_t randomizeDisable=0;
|
||||
|
||||
typedef unsigned int INDEXTYPE; // don't use size_t, as this saves HUGE amounts of RAM
|
||||
std::vector<INDEXTYPE> map; // [t] -> t' indices in randomized order
|
||||
size_t currentseed; // seed for current sequence
|
||||
size_t randomizationrange; // t - randomizationrange/2 <= t' < t + randomizationrange/2 (we support this to enable swapping)
|
||||
// special values (randomizeDisable)
|
||||
void invalidate() { currentseed = (size_t) -1; }
|
||||
public:
|
||||
randomordering() { invalidate(); randomizationrange = randomizeDisable;}
|
||||
|
||||
void resize (size_t len, size_t p_randomizationrange) { randomizationrange = p_randomizationrange; if (len > 0) map.resize (len); invalidate(); }
|
||||
|
||||
// return the randomized feature bounds for a time range
|
||||
std::pair<size_t,size_t> bounds (size_t ts, size_t te) const
|
||||
{
|
||||
size_t tbegin = max (ts, randomizationrange/2) - randomizationrange/2;
|
||||
size_t tend = min (te + randomizationrange/2, map.size());
|
||||
return std::make_pair<size_t,size_t> (move(tbegin), move(tend));
|
||||
}
|
||||
|
||||
// this returns the map directly (read-only) and will lazily initialize it for a given seed
|
||||
const std::vector<INDEXTYPE> & operator() (size_t seed) //throw()
|
||||
{
|
||||
// if wrong seed then lazily recache the sequence
|
||||
if (seed != currentseed && randomizationrange != randomizeDisable)
|
||||
{
|
||||
// test for numeric overflow
|
||||
if (map.size()-1 != (INDEXTYPE) (map.size()-1))
|
||||
throw std::runtime_error ("randomordering: INDEXTYPE has too few bits for this corpus");
|
||||
// 0, 1, 2...
|
||||
foreach_index (t, map) map[t] = (INDEXTYPE) t;
|
||||
|
||||
if (map.size() > RAND_MAX * (size_t) RAND_MAX)
|
||||
throw std::runtime_error ("randomordering: too large training set: need to change to different random generator!");
|
||||
srand ((unsigned int) seed);
|
||||
size_t retries = 0;
|
||||
foreach_index (t, map)
|
||||
{
|
||||
for (int tries = 0; tries < 5; tries++)
|
||||
{
|
||||
// swap current pos with a random position
|
||||
// Random positions are limited to t+randomizationrange.
|
||||
// This ensures some locality suitable for paging with a sliding window.
|
||||
const size_t tbegin = max ((size_t) t, randomizationrange/2) - randomizationrange/2; // range of window --TODO: use bounds() function above
|
||||
const size_t tend = min (t + randomizationrange/2, map.size());
|
||||
assert (tend >= tbegin); // (guard against potential numeric-wraparound bug)
|
||||
const size_t trand = rand (tbegin, tend); // random number within windows
|
||||
assert ((size_t) t <= trand + randomizationrange/2 && trand < (size_t) t + randomizationrange/2);
|
||||
// if range condition is fulfilled then swap
|
||||
if (trand <= map[t] + randomizationrange/2 && map[t] < trand + randomizationrange/2
|
||||
&& (size_t) t <= map[trand] + randomizationrange/2 && map[trand] < (size_t) t + randomizationrange/2)
|
||||
{
|
||||
::swap (map[t], map[trand]);
|
||||
break;
|
||||
}
|
||||
// but don't multi-swap stuff out of its range (for swapping positions that have been swapped before)
|
||||
// instead, try again with a different random number
|
||||
retries++;
|
||||
}
|
||||
}
|
||||
fprintf (stderr, "randomordering: %d retries for %d elements (%.1f%%) to ensure window condition\n", retries, map.size(), 100.0 * retries / map.size());
|
||||
// ensure the window condition
|
||||
foreach_index (t, map) assert ((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2);
|
||||
#if 0 // and a live check since I don't trust myself here yet
|
||||
foreach_index (t, map) if (!((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2))
|
||||
{
|
||||
fprintf (stderr, "randomordering: windowing condition violated %d -> %d\n", t, map[t]);
|
||||
throw std::logic_error ("randomordering: windowing condition violated");
|
||||
}
|
||||
#endif
|
||||
#if 0 // test whether it is indeed a unique complete sequence
|
||||
auto map2 = map;
|
||||
::sort (map2.begin(), map2.end());
|
||||
foreach_index (t, map2) assert (map2[t] == (size_t) t);
|
||||
#endif
|
||||
fprintf (stderr, "randomordering: recached sequence for seed %d: %d, %d, ...\n", (int) seed, (int) map[0], (int) map[1]);
|
||||
currentseed = seed;
|
||||
}
|
||||
return map; // caller can now access it through operator[]
|
||||
}
|
||||
size_t CurrentSeed() {return currentseed;}
|
||||
};
|
||||
|
||||
typedef unsigned short CLASSIDTYPE; // type to store state ids; don't use size_t --saves HUGE amounts of RAM
|
||||
|
||||
};};
|
|
@ -745,7 +745,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
for (auto iter=matrices.begin();iter!=matrices.end();iter++)
|
||||
{
|
||||
if (m_nameToTypeMap.find(iter->first)==m_nameToTypeMap.end())
|
||||
throw std::runtime_error(msra::strfun::strprintf("minibatch requested for input node %S not found in reader - cannot generate input\n",iter->first.c_str()));
|
||||
throw std::runtime_error(msra::strfun::strprintf("minibatch requested for input node %ls not found in reader - cannot generate input\n",iter->first.c_str()));
|
||||
|
||||
}
|
||||
m_checkDictionaryKeys=false;
|
||||
|
@ -1168,7 +1168,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
{
|
||||
if (matrices.find(iter->first)==matrices.end())
|
||||
{
|
||||
fprintf(stderr,"GetMinibatchToWrite: feature node %S specified in reader not found in the network\n",iter->first.c_str());
|
||||
fprintf(stderr,"GetMinibatchToWrite: feature node %ls specified in reader not found in the network\n",iter->first.c_str());
|
||||
throw std::runtime_error("GetMinibatchToWrite: feature node specified in reader not found in the network.");
|
||||
}
|
||||
}
|
||||
|
@ -1176,7 +1176,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
for (auto iter=matrices.begin();iter!=matrices.end();iter++)
|
||||
{
|
||||
if (m_featureNameToIdMap.find(iter->first)==m_featureNameToIdMap.end())
|
||||
throw std::runtime_error(msra::strfun::strprintf("minibatch requested for input node %ws not found in reader - cannot generate input\n",iter->first.c_str()));
|
||||
throw std::runtime_error(msra::strfun::strprintf("minibatch requested for input node %ls not found in reader - cannot generate input\n",iter->first.c_str()));
|
||||
}
|
||||
*/
|
||||
m_checkDictionaryKeys=false;
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -32,25 +24,12 @@
|
|||
</SccProvider>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
|
@ -61,53 +40,25 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;HTKMLFREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>CNTKMath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
|
@ -123,25 +74,6 @@
|
|||
<AdditionalDependencies>CNTKMath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;HTKMLFREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>CNTKMath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<Profile>true</Profile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -199,16 +131,10 @@
|
|||
<ClCompile Include="DataReader.cpp" />
|
||||
<ClCompile Include="DataWriter.cpp" />
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</PrecompiledHeader>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
|
@ -217,9 +143,7 @@
|
|||
<ClCompile Include="HTKMLFWriter.cpp" />
|
||||
<ClCompile Include="latticearchive.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -879,6 +879,7 @@ private:
|
|||
auto & chunkdata = randomizedchunks[m][k].getchunkdata();
|
||||
if (chunkdata.isinram())
|
||||
{
|
||||
if (verbosity)
|
||||
fprintf (stderr, "releaserandomizedchunk: paging out randomized chunk %d (frame range [%d..%d]), %d resident in RAM\n",
|
||||
k, randomizedchunks[m][k].globalts, randomizedchunks[m][k].globalte()-1, chunksinram-1);
|
||||
chunkdata.releasedata();
|
||||
|
|
|
@ -52,11 +52,13 @@
|
|||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include "SequenceParser.h"
|
||||
#include <stdexcept>
|
||||
#include <stdint.h>
|
||||
|
|
|
@ -340,7 +340,7 @@ void SequenceReader<ElemType>::WriteLabelFile()
|
|||
}
|
||||
else if (!m_cachingWriter)
|
||||
{
|
||||
//fprintf(stderr, "WARNING: file %ws NOT written to disk, label files only written when starting at epoch zero!", labelInfo.fileToWrite.c_str());
|
||||
//fprintf(stderr, "WARNING: file %ls NOT written to disk, label files only written when starting at epoch zero!", labelInfo.fileToWrite.c_str());
|
||||
std::wcerr << "WARNING: file " << labelInfo.fileToWrite.c_str() << " NOT written to disk, label files only written when starting at epoch zero!" << endl;
|
||||
}
|
||||
}
|
||||
|
@ -565,8 +565,8 @@ void SequenceReader<ElemType>::Init(const ConfigParameters& readerConfig)
|
|||
std::wstring m_file = readerConfig("file");
|
||||
if (m_traceLevel > 0)
|
||||
{
|
||||
fprintf(stderr, "haha reading sequence file %S\n", m_file.c_str());
|
||||
//std::wcerr << "reading sequence file" << m_file.c_str() << endl;
|
||||
//fprintf(stderr, "reading sequence file %ls\n", m_file.c_str());
|
||||
std::wcerr << "reading sequence file" << m_file.c_str() << endl;
|
||||
}
|
||||
|
||||
const LabelInfo& labelIn = m_labelInfo[labelInfoIn];
|
||||
|
@ -646,6 +646,11 @@ void SequenceReader<ElemType>::ReadClassInfo(const wstring & vocfile, bool /*fla
|
|||
}
|
||||
fin.close();
|
||||
class_size++;
|
||||
|
||||
std::vector<double> counts(idx4cnt.size());
|
||||
for (auto p : idx4cnt)
|
||||
counts[p.first] = (double)p.second;
|
||||
m = noiseSampler<long>(counts);
|
||||
}
|
||||
|
||||
// InitCache - Initialize the caching reader if cache files exist, otherwise the writer
|
||||
|
@ -777,7 +782,7 @@ void SequenceReader<ElemType>::SetupEpoch()
|
|||
if (m_totalSamples == 0)
|
||||
{
|
||||
if (m_traceLevel > 0)
|
||||
fprintf(stderr, "starting at epoch %zu parsing all data to determine record count\n", m_epoch);
|
||||
fprintf(stderr, "starting at epoch %d parsing all data to determine record count\n", m_epoch);
|
||||
// choose a large number to read
|
||||
m_parser.SetFilePosition(0);
|
||||
m_mbStartSample = 0;
|
||||
|
@ -787,7 +792,7 @@ void SequenceReader<ElemType>::SetupEpoch()
|
|||
m_seqIndex = m_sequence.size();
|
||||
}
|
||||
if (m_traceLevel > 0)
|
||||
fprintf(stderr, "\n %zu records found\n", m_totalSamples);
|
||||
fprintf(stderr, "\n %lld records found\n", m_totalSamples);
|
||||
}
|
||||
m_seqIndex = 0;
|
||||
|
||||
|
@ -970,9 +975,11 @@ bool SequenceReader<ElemType>::SentenceEnd()
|
|||
return false;
|
||||
}
|
||||
|
||||
/// the output label is a [2 x T] matrix.
|
||||
/// the output label is a [4 x T] matrix, where T is the number of words observed
|
||||
/// the first row is the word index
|
||||
/// the second row is the class id of this word
|
||||
/// the third row is begining index of the class for this word
|
||||
/// the fourth row is the ending index + 1 of the class for this word
|
||||
template<class ElemType>
|
||||
void SequenceReader<ElemType>::GetLabelOutput(std::map<std::wstring, Matrix<ElemType>*>& matrices,
|
||||
size_t m_mbStartSample, size_t actualmbsize)
|
||||
|
@ -981,27 +988,67 @@ void SequenceReader<ElemType>::GetLabelOutput(std::map<std::wstring, Matrix<Elem
|
|||
Matrix<ElemType>* labels = matrices[m_labelsName[labelInfoOut]];
|
||||
if (labels == nullptr) return;
|
||||
|
||||
labels->Resize(4, actualmbsize);
|
||||
if (readerMode == ReaderMode::NCE)
|
||||
labels->Resize(2 * (this->noise_sample_size + 1), actualmbsize);
|
||||
else if (readerMode == ReaderMode::Class)
|
||||
labels->Resize(4, actualmbsize);
|
||||
else if (readerMode == ReaderMode::Softmax)
|
||||
labels->Resize(1, actualmbsize);
|
||||
|
||||
for (size_t jSample = m_mbStartSample; j < actualmbsize; ++j, ++jSample)
|
||||
{
|
||||
// pick the right sample with randomization if desired
|
||||
size_t jRand = jSample;
|
||||
|
||||
int wrd = m_labelIdData[jRand];
|
||||
int clsidx = idx4class[wrd];
|
||||
|
||||
labels->SetValue(0, j, (ElemType)wrd);
|
||||
|
||||
if (class_size > 0){
|
||||
labels->SetValue(1, j, (ElemType)clsidx);
|
||||
|
||||
/// save the [begining ending_indx) of the class
|
||||
labels->SetValue(2, j, (*m_classInfoLocal)(0, clsidx)); /// begining index of the class
|
||||
labels->SetValue(3, j, (*m_classInfoLocal)(1, clsidx)); /// end index of the class
|
||||
if (readerMode == ReaderMode::NCE)
|
||||
{
|
||||
labels->SetValue(1, j, (ElemType)m.logprob(wrd));
|
||||
for (size_t noiseid = 0; noiseid < this->noise_sample_size; noiseid++)
|
||||
{
|
||||
int wid = m.sample();
|
||||
labels->SetValue(2 * (noiseid + 1), j, (ElemType)wid);
|
||||
labels->SetValue(2 * (noiseid + 1) + 1, j, -(ElemType)m.logprob(wid));
|
||||
}
|
||||
}
|
||||
else if (readerMode == ReaderMode::Class)
|
||||
{
|
||||
int clsidx = idx4class[wrd];
|
||||
if (class_size > 0){
|
||||
labels->SetValue(1, j, (ElemType)clsidx);
|
||||
/// save the [begining ending_indx) of the class
|
||||
labels->SetValue(2, j, (*m_classInfoLocal)(0, clsidx)); /// begining index of the class
|
||||
labels->SetValue(3, j, (*m_classInfoLocal)(1, clsidx)); /// end index of the class
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
template<class ElemType>
|
||||
void SequenceReader<ElemType>::GetInputProb(std::map<std::wstring, Matrix<ElemType>*>& matrices)
|
||||
{
|
||||
Matrix<ElemType>* idx2prob = matrices[STRIDX2PROB];
|
||||
if (idx2prob == nullptr) return;
|
||||
|
||||
if (m_idx2probRead) return;
|
||||
|
||||
// populate local CPU matrix
|
||||
m_id2Prob->SwitchToMatrixType(MatrixType::DENSE, matrixFormatDense, false);
|
||||
m_id2Prob->Resize(nwords, 1, false);
|
||||
|
||||
//move to CPU since element-wise operation is expensive and can go wrong in GPU
|
||||
int curDevId = m_id2Prob->GetDeviceId();
|
||||
m_id2Prob->TransferFromDeviceToDevice(curDevId, CPUDEVICE, true, false, false);
|
||||
for (size_t j = 0; j < nwords; j++)
|
||||
(*m_id2Prob)((int)j, 0) = (float)m.prob((int)j);
|
||||
m_id2Prob->TransferFromDeviceToDevice(CPUDEVICE, curDevId, true, false, false);
|
||||
|
||||
int oldDeviceId = idx2prob->GetDeviceId();
|
||||
// caution, SetValue changes idx2cls from GPU to CPU, may change this behavior later
|
||||
idx2prob->SetValue(*m_id2Prob);
|
||||
idx2prob->TransferFromDeviceToDevice(idx2prob->GetDeviceId(), oldDeviceId, true);
|
||||
|
||||
m_idx2probRead = true;
|
||||
}
|
||||
|
||||
template<class ElemType>
|
||||
|
@ -1340,6 +1387,18 @@ void BatchSequenceReader<ElemType>::Init(const ConfigParameters& readerConfig)
|
|||
|
||||
ConfigParameters featureConfig = readerConfig(m_featuresName,"");
|
||||
ConfigParameters labelConfig[2] = {readerConfig(m_labelsName[0],""),readerConfig(m_labelsName[1],"")};
|
||||
string mode = featureConfig("mode","class");//class, softmax, nce
|
||||
|
||||
if (mode == "nce")
|
||||
{
|
||||
readerMode = ReaderMode::NCE;
|
||||
|
||||
this->noise_sample_size = featureConfig("noise_number", "0");
|
||||
}
|
||||
else if (mode == "softmax")
|
||||
readerMode = ReaderMode::Softmax;
|
||||
else if (mode == "class")
|
||||
readerMode = ReaderMode::Class;
|
||||
|
||||
class_size = 0;
|
||||
m_featureDim = featureConfig("dim");
|
||||
|
@ -1459,8 +1518,8 @@ void BatchSequenceReader<ElemType>::Init(const ConfigParameters& readerConfig)
|
|||
std::wstring m_file = readerConfig("file");
|
||||
if (m_traceLevel > 0)
|
||||
{
|
||||
fprintf(stderr, "reading sequence file %S\n", m_file.c_str());
|
||||
//std::wcerr << "reading sequence file " << m_file.c_str() << endl;
|
||||
//fwprintf(stderr, L"reading sequence file %s\n", m_file.c_str());
|
||||
std::wcerr << "reading sequence file " << m_file.c_str() << endl;
|
||||
}
|
||||
|
||||
const LabelInfo& labelIn = m_labelInfo[labelInfoIn];
|
||||
|
@ -1802,8 +1861,11 @@ bool BatchSequenceReader<ElemType>::GetMinibatch(std::map<std::wstring, Matrix<E
|
|||
features.TransferFromDeviceToDevice(CPUDEVICE, featureDeviceId, false,false, false);
|
||||
|
||||
// TODO: move these two methods to startMiniBatchLoop()
|
||||
GetInputToClass(matrices);
|
||||
GetClassInfo();
|
||||
if (readerMode == ReaderMode::Class)
|
||||
{
|
||||
GetInputToClass(matrices);
|
||||
GetClassInfo();
|
||||
}
|
||||
GetLabelOutput(matrices, 0, actualmbsize);
|
||||
|
||||
// go to the next sequence
|
||||
|
@ -1910,6 +1972,12 @@ bool BatchSequenceReader<ElemType>::DataEnd(EndDataType endDataType)
|
|||
|
||||
}
|
||||
|
||||
/// labels are in [4 x T] matrix
|
||||
/// 1st row is the word id
|
||||
/// 2nd row is the class id of this word
|
||||
/// 3rd and 4th rows are the begining and ending indices of this class
|
||||
/// notice that indices are defined as follows [begining ending_indx) of the class
|
||||
/// i.e., the ending_index is 1 plus of the true ending index
|
||||
template<class ElemType>
|
||||
void BatchSequenceReader<ElemType>::GetLabelOutput(std::map<std::wstring,
|
||||
Matrix<ElemType>*>& matrices,
|
||||
|
@ -1919,35 +1987,43 @@ void BatchSequenceReader<ElemType>::GetLabelOutput(std::map<std::wstring,
|
|||
Matrix<ElemType>* labels = matrices[m_labelsName[labelInfoOut]];
|
||||
if (labels == nullptr) return;
|
||||
|
||||
if(labels->GetMatrixType() == MatrixType::DENSE)
|
||||
{
|
||||
if (readerMode == ReaderMode::NCE)
|
||||
labels->Resize(2 * (this->noise_sample_size + 1), actualmbsize);
|
||||
else if (readerMode == ReaderMode::Class)
|
||||
labels->Resize(4, actualmbsize, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
RuntimeError("GetLabelOutput::should use dense matrix for labels which only save index of words");
|
||||
}
|
||||
labels->Resize(1, actualmbsize, false);
|
||||
|
||||
|
||||
//move to CPU since element-wise operation is expensive and can go wrong in GPU
|
||||
int curDevId = labels->GetDeviceId();
|
||||
labels->TransferFromDeviceToDevice(curDevId, CPUDEVICE, true, false, false);
|
||||
|
||||
|
||||
if(labels->GetCurrentMatrixLocation() == CPU) {
|
||||
for (size_t jSample = m_mbStartSample; j < actualmbsize; ++j, ++jSample)
|
||||
if (labels->GetCurrentMatrixLocation() == CPU)
|
||||
for (size_t jSample = m_mbStartSample; j < actualmbsize; ++j, ++jSample)
|
||||
{
|
||||
// pick the right sample with randomization if desired
|
||||
size_t jRand = jSample;
|
||||
int wrd = m_labelIdData[jRand];
|
||||
labels->SetValue(0, j, (ElemType)wrd);
|
||||
SetSentenceEnd(wrd, j, actualmbsize);
|
||||
|
||||
if (readerMode == ReaderMode::NCE)
|
||||
{
|
||||
// pick the right sample with randomization if desired
|
||||
size_t jRand = jSample;
|
||||
|
||||
int wrd = m_labelIdData[jRand];
|
||||
int clsidx = idx4class[wrd];
|
||||
|
||||
labels->SetValue(0, j, (ElemType)wrd);
|
||||
|
||||
SetSentenceEnd(wrd, j, actualmbsize);
|
||||
|
||||
if (class_size > 0)
|
||||
labels->SetValue(1, j, (ElemType)m.logprob(wrd));
|
||||
for (size_t noiseid = 0; noiseid < this->noise_sample_size; noiseid++)
|
||||
{
|
||||
int wid = m.sample();
|
||||
labels->SetValue(2 * (noiseid + 1), j, (ElemType)wid);
|
||||
labels->SetValue(2 * (noiseid + 1) + 1, j, -(ElemType)m.logprob(wid));
|
||||
}
|
||||
}
|
||||
else if (readerMode == ReaderMode::Class)
|
||||
{
|
||||
int clsidx = idx4class[wrd];
|
||||
if (class_size > 0){
|
||||
|
||||
labels->SetValue(1, j, (ElemType)clsidx);
|
||||
|
||||
/// save the [begining ending_indx) of the class
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <map>
|
||||
#include <vector>
|
||||
#include "minibatchsourcehelpers.h"
|
||||
|
||||
#include <random>
|
||||
|
||||
namespace Microsoft { namespace MSR { namespace CNTK {
|
||||
|
||||
|
@ -23,6 +23,7 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
#define STRIDX2CLS L"idx2cls"
|
||||
#define CLASSINFO L"classinfo"
|
||||
|
||||
#define STRIDX2PROB L"idx2prob"
|
||||
#define MAX_STRING 2048
|
||||
|
||||
enum LabelKind
|
||||
|
@ -33,6 +34,60 @@ enum LabelKind
|
|||
labelOther = 3, // some other type of label
|
||||
};
|
||||
|
||||
enum ReaderMode
|
||||
{
|
||||
Softmax = 0, // no labels to worry about
|
||||
Class = 1, // category labels, creates mapping tables
|
||||
NCE = 2, // sentence mapping (predicts next word)
|
||||
None = 3, // some other type of label
|
||||
};
|
||||
|
||||
template <typename Count>
|
||||
class noiseSampler {
|
||||
std::vector<double> m_prob, m_log_prob;
|
||||
std::uniform_int_distribution<Count> unif_int;
|
||||
bool uniform_sampling;
|
||||
double uniform_prob;
|
||||
double uniform_log_prob;
|
||||
std::piecewise_constant_distribution<double> d;
|
||||
std::mt19937 rng;
|
||||
public:
|
||||
noiseSampler(){ }
|
||||
noiseSampler(const std::vector<double> &counts, bool xuniform_sampling = false)
|
||||
:uniform_sampling(xuniform_sampling), rng(1234)
|
||||
{
|
||||
size_t k = counts.size();
|
||||
uniform_prob = 1.0 / k;
|
||||
uniform_log_prob = std::log(uniform_prob);
|
||||
std::vector<double> vn(counts.size() + 1);
|
||||
for (int i = 0; i < vn.size(); i++)
|
||||
vn[i] = i;
|
||||
d = std::piecewise_constant_distribution<double>(vn.begin(), vn.end(), counts.begin());
|
||||
unif_int = std::uniform_int_distribution<Count>(0,(long) counts.size() - 1);
|
||||
m_prob = d.densities();
|
||||
m_log_prob.resize(m_prob.size());
|
||||
for (int i = 0; i < k; i++)
|
||||
m_log_prob[i] = std::log(m_prob[i]);
|
||||
}
|
||||
int size() const{ return m_prob.size(); }
|
||||
double prob(int i) const { if (uniform_sampling) return uniform_prob; else return m_prob[i]; }
|
||||
double logprob(int i) const { if (uniform_sampling) return uniform_log_prob; else return m_log_prob[i]; }
|
||||
|
||||
template <typename Engine>
|
||||
int sample(Engine &eng) const
|
||||
{
|
||||
int m = unif_int(eng);
|
||||
if (uniform_sampling)
|
||||
return m;
|
||||
return (int)d(eng);
|
||||
}
|
||||
|
||||
int sample()
|
||||
{
|
||||
return sample(this->rng);
|
||||
}
|
||||
};
|
||||
|
||||
template<class ElemType>
|
||||
class SequenceReader : public IDataReader<ElemType>
|
||||
{
|
||||
|
@ -40,6 +95,7 @@ protected:
|
|||
bool m_idx2clsRead;
|
||||
bool m_clsinfoRead;
|
||||
|
||||
bool m_idx2probRead;
|
||||
std::wstring m_file;
|
||||
public:
|
||||
using LabelType = typename IDataReader<ElemType>::LabelType;
|
||||
|
@ -52,10 +108,15 @@ public:
|
|||
Matrix<ElemType>* m_id2classLocal; // CPU version
|
||||
Matrix<ElemType>* m_classInfoLocal; // CPU version
|
||||
|
||||
Matrix<ElemType>* m_id2Prob; // CPU version
|
||||
int class_size;
|
||||
map<int, vector<int>> class_words;
|
||||
vector<int>class_cn;
|
||||
|
||||
int noise_sample_size;
|
||||
noiseSampler<long> m;
|
||||
|
||||
ReaderMode readerMode;
|
||||
int eos_idx, unk_idx;
|
||||
public:
|
||||
// typedef std::string LabelType;
|
||||
|
@ -158,12 +219,15 @@ public:
|
|||
void GetLabelOutput(std::map<std::wstring, Matrix<ElemType>*>& matrices,
|
||||
size_t m_mbStartSample, size_t actualmbsize);
|
||||
void GetInputToClass(std::map<std::wstring, Matrix<ElemType>*>& matrices);
|
||||
|
||||
void GetInputProb(std::map<std::wstring, Matrix<ElemType>*>& matrices);
|
||||
void GetClassInfo();
|
||||
|
||||
virtual void Destroy();
|
||||
SequenceReader() {
|
||||
m_featuresBuffer=NULL; m_labelsBuffer=NULL; m_clsinfoRead = false; m_idx2clsRead = false;
|
||||
m_cachingReader=NULL; m_cachingWriter=NULL; m_labelsIdBuffer = NULL;
|
||||
readerMode = ReaderMode::Class;
|
||||
/*
|
||||
delete m_featuresBufferRow;
|
||||
delete m_featuresBufferRowIdx;
|
||||
|
@ -247,6 +311,8 @@ public:
|
|||
using SequenceReader<ElemType>::m_sequence;
|
||||
using SequenceReader<ElemType>::idx4class;
|
||||
using SequenceReader<ElemType>::m_indexer;
|
||||
using SequenceReader<ElemType>::m;
|
||||
using SequenceReader<ElemType>::readerMode;
|
||||
using SequenceReader<ElemType>::GetIdFromLabel;
|
||||
using SequenceReader<ElemType>::GetInputToClass;
|
||||
using SequenceReader<ElemType>::GetClassInfo;
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
//
|
||||
// <copyright file="minibatchsourcehelpers.h" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//
|
||||
// minibatchsourcehelpers.h -- helper classes for minibatch sources
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "basetypes.h"
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace msra { namespace dbn {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// randomordering -- class to help manage randomization of input data
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static inline size_t rand (const size_t begin, const size_t end)
|
||||
{
|
||||
const size_t randno = ::rand() * RAND_MAX + ::rand(); // BUGBUG: still only covers 32-bit range
|
||||
return begin + randno % (end - begin);
|
||||
}
|
||||
|
||||
class randomordering // note: NOT thread-safe at all
|
||||
{
|
||||
// constants for randomization
|
||||
const static size_t randomizeDisable=0;
|
||||
|
||||
typedef unsigned int INDEXTYPE; // don't use size_t, as this saves HUGE amounts of RAM
|
||||
std::vector<INDEXTYPE> map; // [t] -> t' indices in randomized order
|
||||
size_t currentseed; // seed for current sequence
|
||||
size_t randomizationrange; // t - randomizationrange/2 <= t' < t + randomizationrange/2 (we support this to enable swapping)
|
||||
// special values (randomizeDisable)
|
||||
void invalidate() { currentseed = (size_t) -1; }
|
||||
public:
|
||||
randomordering() { invalidate(); randomizationrange = randomizeDisable;}
|
||||
|
||||
void resize (size_t len, size_t p_randomizationrange) { randomizationrange = p_randomizationrange; if (len > 0) map.resize (len); invalidate(); }
|
||||
|
||||
// return the randomized feature bounds for a time range
|
||||
std::pair<size_t,size_t> bounds (size_t ts, size_t te) const
|
||||
{
|
||||
size_t tbegin = max (ts, randomizationrange/2) - randomizationrange/2;
|
||||
size_t tend = min (te + randomizationrange/2, map.size());
|
||||
return std::make_pair<size_t,size_t> (move(tbegin), move(tend));
|
||||
}
|
||||
|
||||
// this returns the map directly (read-only) and will lazily initialize it for a given seed
|
||||
const std::vector<INDEXTYPE> & operator() (size_t seed) //throw()
|
||||
{
|
||||
// if wrong seed then lazily recache the sequence
|
||||
if (seed != currentseed && randomizationrange != randomizeDisable)
|
||||
{
|
||||
// test for numeric overflow
|
||||
if (map.size()-1 != (INDEXTYPE) (map.size()-1))
|
||||
throw std::runtime_error ("randomordering: INDEXTYPE has too few bits for this corpus");
|
||||
// 0, 1, 2...
|
||||
foreach_index (t, map) map[t] = (INDEXTYPE) t;
|
||||
|
||||
if (map.size() > RAND_MAX * (size_t) RAND_MAX)
|
||||
throw std::runtime_error ("randomordering: too large training set: need to change to different random generator!");
|
||||
srand ((unsigned int) seed);
|
||||
size_t retries = 0;
|
||||
foreach_index (t, map)
|
||||
{
|
||||
for (int tries = 0; tries < 5; tries++)
|
||||
{
|
||||
// swap current pos with a random position
|
||||
// Random positions are limited to t+randomizationrange.
|
||||
// This ensures some locality suitable for paging with a sliding window.
|
||||
const size_t tbegin = max ((size_t) t, randomizationrange/2) - randomizationrange/2; // range of window --TODO: use bounds() function above
|
||||
const size_t tend = min (t + randomizationrange/2, map.size());
|
||||
assert (tend >= tbegin); // (guard against potential numeric-wraparound bug)
|
||||
const size_t trand = rand (tbegin, tend); // random number within windows
|
||||
assert ((size_t) t <= trand + randomizationrange/2 && trand < (size_t) t + randomizationrange/2);
|
||||
// if range condition is fulfilled then swap
|
||||
if (trand <= map[t] + randomizationrange/2 && map[t] < trand + randomizationrange/2
|
||||
&& (size_t) t <= map[trand] + randomizationrange/2 && map[trand] < (size_t) t + randomizationrange/2)
|
||||
{
|
||||
::swap (map[t], map[trand]);
|
||||
break;
|
||||
}
|
||||
// but don't multi-swap stuff out of its range (for swapping positions that have been swapped before)
|
||||
// instead, try again with a different random number
|
||||
retries++;
|
||||
}
|
||||
}
|
||||
fprintf (stderr, "randomordering: %zu retries for %zu elements (%.1f%%) to ensure window condition\n", retries, map.size(), 100.0 * retries / map.size());
|
||||
// ensure the window condition
|
||||
foreach_index (t, map) assert ((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2);
|
||||
#if 0 // and a live check since I don't trust myself here yet
|
||||
foreach_index (t, map) if (!((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2))
|
||||
{
|
||||
fprintf (stderr, "randomordering: windowing condition violated %d -> %d\n", t, map[t]);
|
||||
throw std::logic_error ("randomordering: windowing condition violated");
|
||||
}
|
||||
#endif
|
||||
#if 0 // test whether it is indeed a unique complete sequence
|
||||
auto map2 = map;
|
||||
::sort (map2.begin(), map2.end());
|
||||
foreach_index (t, map2) assert (map2[t] == (size_t) t);
|
||||
#endif
|
||||
fprintf (stderr, "randomordering: recached sequence for seed %d: %d, %d, ...\n", (int) seed, (int) map[0], (int) map[1]);
|
||||
currentseed = seed;
|
||||
}
|
||||
return map; // caller can now access it through operator[]
|
||||
}
|
||||
size_t CurrentSeed() {return currentseed;}
|
||||
};
|
||||
|
||||
typedef unsigned short CLASSIDTYPE; // type to store state ids; don't use size_t --saves HUGE amounts of RAM
|
||||
|
||||
};};
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
|
||||
#define DATAWRITER_EXPORTS
|
||||
#include "DataWriter.h"
|
||||
|
|
|
@ -163,7 +163,7 @@ void LUSequenceReader<ElemType>::WriteLabelFile()
|
|||
}
|
||||
else if (!m_cachingWriter)
|
||||
{
|
||||
fprintf(stderr, "WARNING: file %S NOT written to disk, label files only written when starting at epoch zero!", labelInfo.fileToWrite.c_str());
|
||||
fprintf(stderr, "WARNING: file %ls NOT written to disk, label files only written when starting at epoch zero!", labelInfo.fileToWrite.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ void LUSequenceReader<ElemType>::Init(const ConfigParameters& readerConfig)
|
|||
|
||||
std::wstring m_file = readerConfig("file");
|
||||
if (m_traceLevel > 0)
|
||||
fprintf(stderr, "reading sequence file %S\n", m_file.c_str());
|
||||
fprintf(stderr, "reading sequence file %ls\n", m_file.c_str());
|
||||
|
||||
const LabelInfo& labelIn = m_labelInfo[labelInfoIn];
|
||||
const LabelInfo& labelOut = m_labelInfo[labelInfoOut];
|
||||
|
@ -955,7 +955,7 @@ void BatchLUSequenceReader<ElemType>::Init(const ConfigParameters& readerConfig)
|
|||
|
||||
std::wstring m_file = readerConfig("file");
|
||||
if (m_traceLevel > 0)
|
||||
fprintf(stderr, "reading sequence file %S\n", m_file.c_str());
|
||||
fprintf(stderr, "reading sequence file %ls\n", m_file.c_str());
|
||||
|
||||
const LabelInfo& labelIn = m_labelInfo[labelInfoIn];
|
||||
const LabelInfo& labelOut = m_labelInfo[labelInfoOut];
|
||||
|
|
|
@ -52,11 +52,13 @@
|
|||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "stdafx.h"
|
||||
#include <objbase.h>
|
||||
#include "basetypes.h"
|
||||
#include "Basics.h"
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -1,118 +0,0 @@
|
|||
//
|
||||
// <copyright file="minibatchsourcehelpers.h" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//
|
||||
// minibatchsourcehelpers.h -- helper classes for minibatch sources
|
||||
//
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "basetypes.h"
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace msra { namespace dbn {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// randomordering -- class to help manage randomization of input data
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static inline size_t rand (const size_t begin, const size_t end)
|
||||
{
|
||||
const size_t randno = ::rand() * RAND_MAX + ::rand(); // BUGBUG: still only covers 32-bit range
|
||||
return begin + randno % (end - begin);
|
||||
}
|
||||
|
||||
class randomordering // note: NOT thread-safe at all
|
||||
{
|
||||
// constants for randomization
|
||||
const static size_t randomizeDisable=0;
|
||||
|
||||
typedef unsigned int INDEXTYPE; // don't use size_t, as this saves HUGE amounts of RAM
|
||||
std::vector<INDEXTYPE> map; // [t] -> t' indices in randomized order
|
||||
size_t currentseed; // seed for current sequence
|
||||
size_t randomizationrange; // t - randomizationrange/2 <= t' < t + randomizationrange/2 (we support this to enable swapping)
|
||||
// special values (randomizeDisable)
|
||||
void invalidate() { currentseed = (size_t) -1; }
|
||||
public:
|
||||
randomordering() { invalidate(); randomizationrange = randomizeDisable;}
|
||||
|
||||
void resize (size_t len, size_t p_randomizationrange) { randomizationrange = p_randomizationrange; if (len > 0) map.resize (len); invalidate(); }
|
||||
|
||||
// return the randomized feature bounds for a time range
|
||||
std::pair<size_t,size_t> bounds (size_t ts, size_t te) const
|
||||
{
|
||||
size_t tbegin = max (ts, randomizationrange/2) - randomizationrange/2;
|
||||
size_t tend = min (te + randomizationrange/2, map.size());
|
||||
return std::make_pair<size_t,size_t> (move(tbegin), move(tend));
|
||||
}
|
||||
|
||||
// this returns the map directly (read-only) and will lazily initialize it for a given seed
|
||||
const std::vector<INDEXTYPE> & operator() (size_t seed) //throw()
|
||||
{
|
||||
// if wrong seed then lazily recache the sequence
|
||||
if (seed != currentseed && randomizationrange != randomizeDisable)
|
||||
{
|
||||
// test for numeric overflow
|
||||
if (map.size()-1 != (INDEXTYPE) (map.size()-1))
|
||||
throw std::runtime_error ("randomordering: INDEXTYPE has too few bits for this corpus");
|
||||
// 0, 1, 2...
|
||||
foreach_index (t, map) map[t] = (INDEXTYPE) t;
|
||||
|
||||
if (map.size() > RAND_MAX * (size_t) RAND_MAX)
|
||||
throw std::runtime_error ("randomordering: too large training set: need to change to different random generator!");
|
||||
srand ((unsigned int) seed);
|
||||
size_t retries = 0;
|
||||
foreach_index (t, map)
|
||||
{
|
||||
for (int tries = 0; tries < 5; tries++)
|
||||
{
|
||||
// swap current pos with a random position
|
||||
// Random positions are limited to t+randomizationrange.
|
||||
// This ensures some locality suitable for paging with a sliding window.
|
||||
const size_t tbegin = max ((size_t) t, randomizationrange/2) - randomizationrange/2; // range of window --TODO: use bounds() function above
|
||||
const size_t tend = min (t + randomizationrange/2, map.size());
|
||||
assert (tend >= tbegin); // (guard against potential numeric-wraparound bug)
|
||||
const size_t trand = rand (tbegin, tend); // random number within windows
|
||||
assert ((size_t) t <= trand + randomizationrange/2 && trand < (size_t) t + randomizationrange/2);
|
||||
// if range condition is fulfilled then swap
|
||||
if (trand <= map[t] + randomizationrange/2 && map[t] < trand + randomizationrange/2
|
||||
&& (size_t) t <= map[trand] + randomizationrange/2 && map[trand] < (size_t) t + randomizationrange/2)
|
||||
{
|
||||
::swap (map[t], map[trand]);
|
||||
break;
|
||||
}
|
||||
// but don't multi-swap stuff out of its range (for swapping positions that have been swapped before)
|
||||
// instead, try again with a different random number
|
||||
retries++;
|
||||
}
|
||||
}
|
||||
fprintf (stderr, "randomordering: %zu retries for %zu elements (%.1f%%) to ensure window condition\n", retries, map.size(), 100.0 * retries / map.size());
|
||||
// ensure the window condition
|
||||
foreach_index (t, map) assert ((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2);
|
||||
#if 0 // and a live check since I don't trust myself here yet
|
||||
foreach_index (t, map) if (!((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2))
|
||||
{
|
||||
fprintf (stderr, "randomordering: windowing condition violated %d -> %d\n", t, map[t]);
|
||||
throw std::logic_error ("randomordering: windowing condition violated");
|
||||
}
|
||||
#endif
|
||||
#if 0 // test whether it is indeed a unique complete sequence
|
||||
auto map2 = map;
|
||||
::sort (map2.begin(), map2.end());
|
||||
foreach_index (t, map2) assert (map2[t] == (size_t) t);
|
||||
#endif
|
||||
fprintf (stderr, "randomordering: recached sequence for seed %d: %d, %d, ...\n", (int) seed, (int) map[0], (int) map[1]);
|
||||
currentseed = seed;
|
||||
}
|
||||
return map; // caller can now access it through operator[]
|
||||
}
|
||||
size_t CurrentSeed() {return currentseed;}
|
||||
};
|
||||
|
||||
typedef unsigned short CLASSIDTYPE; // type to store state ids; don't use size_t --saves HUGE amounts of RAM
|
||||
|
||||
};};
|
|
@ -94,12 +94,12 @@ void LibSVMBinaryReader<ElemType>::WriteLabelFile()
|
|||
{
|
||||
labelFile << m_mapIdToLabel[i] << '\n';
|
||||
}
|
||||
fprintf(stderr, "label file %S written to disk\n", m_labelFileToWrite.c_str());
|
||||
fprintf(stderr, "label file %ls written to disk\n", m_labelFileToWrite.c_str());
|
||||
m_labelFileToWrite.clear();
|
||||
}
|
||||
else if (!m_cachingWriter)
|
||||
{
|
||||
fprintf(stderr, "WARNING: file %S NOT written to disk yet, will be written the first time the end of the entire dataset is found.\n", m_labelFileToWrite.c_str());
|
||||
fprintf(stderr, "WARNING: file %ls NOT written to disk yet, will be written the first time the end of the entire dataset is found.\n", m_labelFileToWrite.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -32,25 +24,12 @@
|
|||
<RootNamespace>LibSVMBinaryReader</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
|
@ -61,55 +40,26 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\Math\Math;..\..\Common\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>..\..\math\math;$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>c:\Program Files\Microsoft MPI\Inc;..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>c:\Program Files\Microsoft MPI\Lib\amd64;$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSVMBINARYREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>CNTKmath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
|
@ -128,26 +78,6 @@
|
|||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\;..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;_USRDLL;DSSMREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>CNTKmath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\math\$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<Profile>true</Profile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -176,9 +106,7 @@
|
|||
<ClInclude Include="..\..\Common\Include\basetypes.h" />
|
||||
<ClInclude Include="..\..\Common\Include\DataReader.h" />
|
||||
<ClInclude Include="..\..\Common\Include\DataWriter.h" />
|
||||
<ClInclude Include="..\..\Common\Include\File.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\File.h" />
|
||||
<ClInclude Include="..\..\Common\Include\fileutil.h" />
|
||||
<ClInclude Include="LibSVMBinaryReader.h" />
|
||||
<ClInclude Include="minibatchsourcehelpers.h" />
|
||||
|
@ -189,8 +117,6 @@
|
|||
<ClCompile Include="..\..\Common\ConfigFile.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\Common\DataReader.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
|
@ -201,15 +127,10 @@
|
|||
<ClCompile Include="..\..\Common\File.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\Common\fileutil.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
//
|
||||
// <copyright file="minibatchsourcehelpers.h" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//
|
||||
// minibatchsourcehelpers.h -- helper classes for minibatch sources
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "basetypes.h"
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace msra { namespace dbn {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// randomordering -- class to help manage randomization of input data
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static inline size_t rand (const size_t begin, const size_t end)
|
||||
{
|
||||
const size_t randno = ::rand() * RAND_MAX + ::rand(); // BUGBUG: still only covers 32-bit range
|
||||
return begin + randno % (end - begin);
|
||||
}
|
||||
|
||||
class randomordering // note: NOT thread-safe at all
|
||||
{
|
||||
// constants for randomization
|
||||
const static size_t randomizeDisable=0;
|
||||
|
||||
typedef unsigned int INDEXTYPE; // don't use size_t, as this saves HUGE amounts of RAM
|
||||
std::vector<INDEXTYPE> map; // [t] -> t' indices in randomized order
|
||||
size_t currentseed; // seed for current sequence
|
||||
size_t randomizationrange; // t - randomizationrange/2 <= t' < t + randomizationrange/2 (we support this to enable swapping)
|
||||
// special values (randomizeDisable)
|
||||
void invalidate() { currentseed = (size_t) -1; }
|
||||
public:
|
||||
randomordering() { invalidate(); randomizationrange = randomizeDisable;}
|
||||
|
||||
void resize (size_t len, size_t p_randomizationrange) { randomizationrange = p_randomizationrange; if (len > 0) map.resize (len); invalidate(); }
|
||||
|
||||
// return the randomized feature bounds for a time range
|
||||
std::pair<size_t,size_t> bounds (size_t ts, size_t te) const
|
||||
{
|
||||
size_t tbegin = max (ts, randomizationrange/2) - randomizationrange/2;
|
||||
size_t tend = min (te + randomizationrange/2, map.size());
|
||||
return std::make_pair<size_t,size_t> (move(tbegin), move(tend));
|
||||
}
|
||||
|
||||
// this returns the map directly (read-only) and will lazily initialize it for a given seed
|
||||
const std::vector<INDEXTYPE> & operator() (size_t seed) //throw()
|
||||
{
|
||||
// if wrong seed then lazily recache the sequence
|
||||
if (seed != currentseed && randomizationrange != randomizeDisable)
|
||||
{
|
||||
// test for numeric overflow
|
||||
if (map.size()-1 != (INDEXTYPE) (map.size()-1))
|
||||
throw std::runtime_error ("randomordering: INDEXTYPE has too few bits for this corpus");
|
||||
// 0, 1, 2...
|
||||
foreach_index (t, map) map[t] = (INDEXTYPE) t;
|
||||
|
||||
if (map.size() > RAND_MAX * (size_t) RAND_MAX)
|
||||
throw std::runtime_error ("randomordering: too large training set: need to change to different random generator!");
|
||||
srand ((unsigned int) seed);
|
||||
size_t retries = 0;
|
||||
foreach_index (t, map)
|
||||
{
|
||||
for (int tries = 0; tries < 5; tries++)
|
||||
{
|
||||
// swap current pos with a random position
|
||||
// Random positions are limited to t+randomizationrange.
|
||||
// This ensures some locality suitable for paging with a sliding window.
|
||||
const size_t tbegin = max ((size_t) t, randomizationrange/2) - randomizationrange/2; // range of window --TODO: use bounds() function above
|
||||
const size_t tend = min (t + randomizationrange/2, map.size());
|
||||
assert (tend >= tbegin); // (guard against potential numeric-wraparound bug)
|
||||
const size_t trand = rand (tbegin, tend); // random number within windows
|
||||
assert ((size_t) t <= trand + randomizationrange/2 && trand < (size_t) t + randomizationrange/2);
|
||||
// if range condition is fulfilled then swap
|
||||
if (trand <= map[t] + randomizationrange/2 && map[t] < trand + randomizationrange/2
|
||||
&& (size_t) t <= map[trand] + randomizationrange/2 && map[trand] < (size_t) t + randomizationrange/2)
|
||||
{
|
||||
::swap (map[t], map[trand]);
|
||||
break;
|
||||
}
|
||||
// but don't multi-swap stuff out of its range (for swapping positions that have been swapped before)
|
||||
// instead, try again with a different random number
|
||||
retries++;
|
||||
}
|
||||
}
|
||||
fprintf (stderr, "randomordering: %d retries for %d elements (%.1f%%) to ensure window condition\n", retries, map.size(), 100.0 * retries / map.size());
|
||||
// ensure the window condition
|
||||
foreach_index (t, map) assert ((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2);
|
||||
#if 0 // and a live check since I don't trust myself here yet
|
||||
foreach_index (t, map) if (!((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2))
|
||||
{
|
||||
fprintf (stderr, "randomordering: windowing condition violated %d -> %d\n", t, map[t]);
|
||||
throw std::logic_error ("randomordering: windowing condition violated");
|
||||
}
|
||||
#endif
|
||||
#if 0 // test whether it is indeed a unique complete sequence
|
||||
auto map2 = map;
|
||||
::sort (map2.begin(), map2.end());
|
||||
foreach_index (t, map2) assert (map2[t] == (size_t) t);
|
||||
#endif
|
||||
fprintf (stderr, "randomordering: recached sequence for seed %d: %d, %d, ...\n", (int) seed, (int) map[0], (int) map[1]);
|
||||
currentseed = seed;
|
||||
}
|
||||
return map; // caller can now access it through operator[]
|
||||
}
|
||||
size_t CurrentSeed() {return currentseed;}
|
||||
};
|
||||
|
||||
typedef unsigned short CLASSIDTYPE; // type to store state ids; don't use size_t --saves HUGE amounts of RAM
|
||||
|
||||
};};
|
|
@ -231,12 +231,12 @@ void UCIFastReader<ElemType>::WriteLabelFile()
|
|||
{
|
||||
labelFile << m_mapIdToLabel[i] << '\n';
|
||||
}
|
||||
fprintf(stderr, "label file %S written to disk\n", m_labelFileToWrite.c_str());
|
||||
fprintf(stderr, "label file %ls written to disk\n", m_labelFileToWrite.c_str());
|
||||
m_labelFileToWrite.clear();
|
||||
}
|
||||
else if (!m_cachingWriter)
|
||||
{
|
||||
fprintf(stderr, "WARNING: file %S NOT written to disk yet, will be written the first time the end of the entire dataset is found.\n", m_labelFileToWrite.c_str());
|
||||
fprintf(stderr, "WARNING: file %ls NOT written to disk yet, will be written the first time the end of the entire dataset is found.\n", m_labelFileToWrite.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ void UCIFastReader<ElemType>::Init(const ConfigParameters& readerConfig)
|
|||
|
||||
std::wstring file = configFeatures("file");
|
||||
if (m_traceLevel > 0)
|
||||
fprintf(stderr, "reading uci file %S\n", file.c_str());
|
||||
fprintf(stderr, "reading uci file %ls\n", file.c_str());
|
||||
|
||||
m_parser.ParseInit(file.c_str(), startFeatures, dimFeatures, startLabels, dimLabels);
|
||||
|
||||
|
@ -409,7 +409,7 @@ void UCIFastReader<ElemType>::Init(const ConfigParameters& readerConfig)
|
|||
if (allowLabelCreation)
|
||||
m_labelFileToWrite = labelPath;
|
||||
else
|
||||
RuntimeError("label mapping file %S not found, can be created with a 'createLabelMap' command/action\n", labelPath.c_str());
|
||||
RuntimeError("label mapping file %ls not found, can be created with a 'createLabelMap' command/action\n", labelPath.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -610,7 +610,7 @@ void UCIFastReader<ElemType>::SetupEpoch()
|
|||
m_parser.SetParseMode(ParseNormal);
|
||||
if (!m_labelFileToWrite.empty())
|
||||
{
|
||||
fprintf(stderr, "WARNING: file %S NOT written to disk, label file will only be written when starting epochs at the beginning of the dataset\n", m_labelFileToWrite.c_str());
|
||||
fprintf(stderr, "WARNING: file %ls NOT written to disk, label file will only be written when starting epochs at the beginning of the dataset\n", m_labelFileToWrite.c_str());
|
||||
m_labelFileToWrite.clear();
|
||||
RuntimeError("LabelMappingFile not provided in config, must be provided if not starting from epoch Zero (0)");
|
||||
}
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -32,25 +24,12 @@
|
|||
<RootNamespace>UCIReader</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
|
@ -61,54 +40,25 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\Math\Math;..\..\Common\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\Math\Math;..\..\Common\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>..\..\common\include;..\..\math\math;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration);$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;UCIREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>CNTKmath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
|
@ -126,26 +76,6 @@
|
|||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\;..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UCIREADER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>CNTKmath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\math\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
<Profile>true</Profile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -176,7 +106,6 @@
|
|||
<ClInclude Include="..\..\Common\Include\DataWriter.h" />
|
||||
<ClInclude Include="..\..\Common\Include\File.h" />
|
||||
<ClInclude Include="..\..\Common\Include\fileutil.h" />
|
||||
<ClInclude Include="minibatchsourcehelpers.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="UCIFastReader.h" />
|
||||
|
@ -199,23 +128,15 @@
|
|||
</ClCompile>
|
||||
<ClCompile Include="Exports.cpp" />
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</PrecompiledHeader>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UCIFastReader.cpp" />
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="UCIFastReader.h" />
|
||||
<ClInclude Include="UCIParser.h" />
|
||||
<ClInclude Include="minibatchsourcehelpers.h">
|
||||
<Filter>Duplicates to remove</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\basetypes.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -53,8 +50,5 @@
|
|||
<Filter Include="Common\Include">
|
||||
<UniqueIdentifier>{0dbad9d8-ce99-4f36-b871-3b98a27f58c2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Duplicates to remove">
|
||||
<UniqueIdentifier>{1032308c-b577-4b1e-9f49-9570b93800ec}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,130 +0,0 @@
|
|||
//
|
||||
// <copyright file="minibatchsourcehelpers.h" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//
|
||||
// minibatchsourcehelpers.h -- helper classes for minibatch sources
|
||||
//
|
||||
// F. Seide, Oct 2012
|
||||
//
|
||||
// $Log: /Speech_To_Speech_Translation/dbn/dbn/minibatchsourcehelpers.h $
|
||||
//
|
||||
// 3 10/09/12 7:23p Fseide
|
||||
// moved class minibatchiterator to minibatchiterator.h, and dealt with
|
||||
// the fallout
|
||||
//
|
||||
// 2 10/09/12 7:12p Fseide
|
||||
// moved all minibatch sources to respective new source files
|
||||
//
|
||||
// 1 10/09/12 6:45p Fseide
|
||||
// began to move the minibatch sources to separate source files
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "basetypes.h"
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace msra { namespace dbn {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// randomordering -- class to help manage randomization of input data
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static inline size_t rand (const size_t begin, const size_t end)
|
||||
{
|
||||
const size_t randno = ::rand() * RAND_MAX + ::rand(); // BUGBUG: still only covers 32-bit range
|
||||
return begin + randno % (end - begin);
|
||||
}
|
||||
|
||||
class randomordering // note: NOT thread-safe at all
|
||||
{
|
||||
// constants for randomization
|
||||
const static size_t randomizeDisable=0;
|
||||
|
||||
typedef unsigned int INDEXTYPE; // don't use size_t, as this saves HUGE amounts of RAM
|
||||
std::vector<INDEXTYPE> map; // [t] -> t' indices in randomized order
|
||||
size_t currentseed; // seed for current sequence
|
||||
size_t randomizationrange; // t - randomizationrange/2 <= t' < t + randomizationrange/2 (we support this to enable swapping)
|
||||
// special values (randomizeDisable)
|
||||
void invalidate() { currentseed = (size_t) -1; }
|
||||
public:
|
||||
randomordering() { invalidate(); randomizationrange = randomizeDisable;}
|
||||
|
||||
void resize (size_t len, size_t p_randomizationrange) { randomizationrange = p_randomizationrange; if (len > 0) map.resize (len); invalidate(); }
|
||||
|
||||
// return the randomized feature bounds for a time range
|
||||
std::pair<size_t,size_t> bounds (size_t ts, size_t te) const
|
||||
{
|
||||
size_t tbegin = max (ts, randomizationrange/2) - randomizationrange/2;
|
||||
size_t tend = min (te + randomizationrange/2, map.size());
|
||||
return std::make_pair<size_t,size_t> (move(tbegin), move(tend));
|
||||
}
|
||||
|
||||
// this returns the map directly (read-only) and will lazily initialize it for a given seed
|
||||
const std::vector<INDEXTYPE> & operator() (size_t seed) //throw()
|
||||
{
|
||||
// if wrong seed then lazily recache the sequence
|
||||
if (seed != currentseed && randomizationrange != randomizeDisable)
|
||||
{
|
||||
// test for numeric overflow
|
||||
if (map.size()-1 != (INDEXTYPE) (map.size()-1))
|
||||
throw std::runtime_error ("randomordering: INDEXTYPE has too few bits for this corpus");
|
||||
// 0, 1, 2...
|
||||
foreach_index (t, map) map[t] = (INDEXTYPE) t;
|
||||
|
||||
if (map.size() > RAND_MAX * (size_t) RAND_MAX)
|
||||
throw std::runtime_error ("randomordering: too large training set: need to change to different random generator!");
|
||||
srand ((unsigned int) seed);
|
||||
size_t retries = 0;
|
||||
foreach_index (t, map)
|
||||
{
|
||||
for (int tries = 0; tries < 5; tries++)
|
||||
{
|
||||
// swap current pos with a random position
|
||||
// Random positions are limited to t+randomizationrange.
|
||||
// This ensures some locality suitable for paging with a sliding window.
|
||||
const size_t tbegin = max ((size_t) t, randomizationrange/2) - randomizationrange/2; // range of window --TODO: use bounds() function above
|
||||
const size_t tend = min (t + randomizationrange/2, map.size());
|
||||
assert (tend >= tbegin); // (guard against potential numeric-wraparound bug)
|
||||
const size_t trand = rand (tbegin, tend); // random number within windows
|
||||
assert ((size_t) t <= trand + randomizationrange/2 && trand < (size_t) t + randomizationrange/2);
|
||||
// if range condition is fulfilled then swap
|
||||
if (trand <= map[t] + randomizationrange/2 && map[t] < trand + randomizationrange/2
|
||||
&& (size_t) t <= map[trand] + randomizationrange/2 && map[trand] < (size_t) t + randomizationrange/2)
|
||||
{
|
||||
::swap (map[t], map[trand]);
|
||||
break;
|
||||
}
|
||||
// but don't multi-swap stuff out of its range (for swapping positions that have been swapped before)
|
||||
// instead, try again with a different random number
|
||||
retries++;
|
||||
}
|
||||
}
|
||||
fprintf (stderr, "randomordering: %d retries for %d elements (%.1f%%) to ensure window condition\n", retries, map.size(), 100.0 * retries / map.size());
|
||||
// ensure the window condition
|
||||
foreach_index (t, map) assert ((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2);
|
||||
#if 0 // and a live check since I don't trust myself here yet
|
||||
foreach_index (t, map) if (!((size_t) t <= map[t] + randomizationrange/2 && map[t] < (size_t) t + randomizationrange/2))
|
||||
{
|
||||
fprintf (stderr, "randomordering: windowing condition violated %d -> %d\n", t, map[t]);
|
||||
throw std::logic_error ("randomordering: windowing condition violated");
|
||||
}
|
||||
#endif
|
||||
#if 0 // test whether it is indeed a unique complete sequence
|
||||
auto map2 = map;
|
||||
::sort (map2.begin(), map2.end());
|
||||
foreach_index (t, map2) assert (map2[t] == (size_t) t);
|
||||
#endif
|
||||
fprintf (stderr, "randomordering: recached sequence for seed %d: %d, %d, ...\n", (int) seed, (int) map[0], (int) map[1]);
|
||||
currentseed = seed;
|
||||
}
|
||||
return map; // caller can now access it through operator[]
|
||||
}
|
||||
size_t CurrentSeed() {return currentseed;}
|
||||
};
|
||||
|
||||
typedef unsigned short CLASSIDTYPE; // type to store state ids; don't use size_t --saves HUGE amounts of RAM
|
||||
|
||||
};};
|
|
@ -41,8 +41,8 @@ fileCount = 0
|
|||
fileList = 'TimitSubjectList.txt'
|
||||
fileListFp = open(fileList)
|
||||
|
||||
if !hcopyScript or !cnScriptFp or !cnOutputScriptFp or !fileListFp:
|
||||
print "Can't open the necessary output files.
|
||||
if !hcopyScriptFp or !cnScriptFp or !cnOutputScriptFp or !fileListFp:
|
||||
print "Can't open the necessary output files."
|
||||
sys.exit(0)
|
||||
|
||||
for origFile in fileListFp:
|
||||
|
|
До Ширина: | Высота: | Размер: 15 KiB После Ширина: | Высота: | Размер: 15 KiB |
До Ширина: | Высота: | Размер: 11 KiB После Ширина: | Высота: | Размер: 11 KiB |
До Ширина: | Высота: | Размер: 12 KiB После Ширина: | Высота: | Размер: 12 KiB |
До Ширина: | Высота: | Размер: 16 KiB После Ширина: | Высота: | Размер: 16 KiB |
До Ширина: | Высота: | Размер: 16 KiB После Ширина: | Высота: | Размер: 16 KiB |
До Ширина: | Высота: | Размер: 12 KiB После Ширина: | Высота: | Размер: 12 KiB |
До Ширина: | Высота: | Размер: 18 KiB После Ширина: | Высота: | Размер: 18 KiB |
До Ширина: | Высота: | Размер: 70 KiB После Ширина: | Высота: | Размер: 70 KiB |
До Ширина: | Высота: | Размер: 10 KiB После Ширина: | Высота: | Размер: 10 KiB |
До Ширина: | Высота: | Размер: 16 KiB После Ширина: | Высота: | Размер: 16 KiB |
До Ширина: | Высота: | Размер: 14 KiB После Ширина: | Высота: | Размер: 14 KiB |
До Ширина: | Высота: | Размер: 46 KiB После Ширина: | Высота: | Размер: 46 KiB |
До Ширина: | Высота: | Размер: 177 KiB После Ширина: | Высота: | Размер: 177 KiB |
До Ширина: | Высота: | Размер: 11 KiB После Ширина: | Высота: | Размер: 11 KiB |
До Ширина: | Высота: | Размер: 22 KiB После Ширина: | Высота: | Размер: 22 KiB |
До Ширина: | Высота: | Размер: 11 KiB После Ширина: | Высота: | Размер: 11 KiB |
До Ширина: | Высота: | Размер: 47 KiB После Ширина: | Высота: | Размер: 47 KiB |
|
@ -115,8 +115,7 @@ Jie Gao, Avner May, Baolin Peng, Andreas Stolcke, Malcolm Slaney
|
|||
\end_layout
|
||||
|
||||
\begin_layout Date
|
||||
MSR-TR-2014-112 (DRAFT v0.7: March.
|
||||
19, 2015)
|
||||
MSR-TR-2014-112 (DRAFT v0.8: May 19, 2015)
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
|
@ -1464,17 +1464,7 @@ instead.
|
|||
\end_layout
|
||||
|
||||
\begin_layout Subsubsection
|
||||
Input
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Input
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
, InputValue
|
||||
InputValue
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -1482,6 +1472,16 @@ status open
|
|||
InputValue
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
or Input
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Input
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
|
@ -1502,12 +1502,12 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
Input(rows, [cols=1], {tag=feature|label})
|
||||
InputValue(rows, [cols=1], {tag=feature|label})
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
InputValue(rows, [cols=1])
|
||||
Input(rows, [cols=1], {tag=feature|label}) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -1542,7 +1542,7 @@ ImageInput
|
|||
|
||||
\end_inset
|
||||
|
||||
, Image
|
||||
or Image
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -1586,7 +1586,7 @@ Image(width, height, channels, [numImages=1],
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
{tag=feature|label})
|
||||
{tag=feature|label}) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -1629,17 +1629,7 @@ CNTK uses column-major (similar to matlab) to store the matrices.
|
|||
\end_layout
|
||||
|
||||
\begin_layout Subsubsection
|
||||
Parameter
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Parameter
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
, LearnableParameter
|
||||
LearnableParameter
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -1647,6 +1637,16 @@ status open
|
|||
LearnableParameter
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
or Parameter
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Parameter
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
|
@ -1668,21 +1668,6 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
Parameter(row, [cols=1], {needGradient=true|false,
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
init=fixedValue|Uniform|Gaussian|fromFile,
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
value=0, initValueScale=number})
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
LearnableParameter(row, [cols=1],
|
||||
\end_layout
|
||||
|
||||
|
@ -1701,6 +1686,21 @@ LearnableParameter(row, [cols=1],
|
|||
value=0, initValueScale=number})
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
Parameter(row, [cols=1], {needGradient=true|false,
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
init=fixedValue|Uniform|Gaussian|fromFile,
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
value=0, initValueScale=number}) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
|
@ -1782,7 +1782,7 @@ Constant
|
|||
|
||||
\end_inset
|
||||
|
||||
, Const
|
||||
or Const
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -1813,7 +1813,7 @@ Constant(value, [rows=1, cols=1])
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
Const(value, [rows=1, cols=1])
|
||||
Const(value, [rows=1, cols=1]) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -1845,7 +1845,7 @@ RectifiedLinear
|
|||
|
||||
\end_inset
|
||||
|
||||
, ReLU
|
||||
or ReLU
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -1908,7 +1908,7 @@ RectifiedLinear(m)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
ReLU(m)
|
||||
ReLU(m) #deprecated
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
@ -2355,7 +2355,7 @@ KhatriRaoProduct
|
|||
|
||||
\end_inset
|
||||
|
||||
, ColumnwiseCrossProduct
|
||||
or ColumnwiseCrossProduct
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2388,7 +2388,7 @@ KhatriRaoProduct(m1, m2)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
ColumnwiseCrossProduct(m1, m2)
|
||||
ColumnwiseCrossProduct(m1, m2) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -2412,7 +2412,7 @@ GMMLogLikelihood
|
|||
|
||||
\end_inset
|
||||
|
||||
, GMMLL
|
||||
or GMMLL
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2447,7 +2447,7 @@ GMMLogLikelihood(UnnormedPrior, Means, LogStddev, FeatureValues)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
GMMLL(UnnormedPrior, Means, LogStddev, FeatureValues)
|
||||
GMMLL(UnnormedPrior, Means, LogStddev, FeatureValues) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -2497,7 +2497,7 @@ SquareError
|
|||
|
||||
\end_inset
|
||||
|
||||
, SE
|
||||
or SE
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2530,7 +2530,7 @@ SquareError(m1, m2)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
SE(m1, m2)
|
||||
SE(m1, m2) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -2554,7 +2554,7 @@ CrossEntropyWithSoftmax
|
|||
|
||||
\end_inset
|
||||
|
||||
, CEWithSM
|
||||
or CEWithSM
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2588,7 +2588,7 @@ CrossEntropyWithSoftmax(labels, matrix)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
CEWithSM(labels, matrix)
|
||||
CEWithSM(labels, matrix) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -2615,7 +2615,7 @@ ClassBasedCrossEntropyWithSoftmax
|
|||
|
||||
\end_inset
|
||||
|
||||
, CBCEWithSM
|
||||
or CBCEWithSM
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2649,7 +2649,8 @@ ClassBasedCrossEntropyWithSoftmax(labels, matrix)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
CBCEWithSM(labels, mainInputInfo, mainWeight, classProbBeforeSoftmax)
|
||||
CBCEWithSM(labels, mainInputInfo, mainWeight, classProbBeforeSoftmax) #deprecate
|
||||
d
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -2698,7 +2699,7 @@ ErrorPrediction
|
|||
|
||||
\end_inset
|
||||
|
||||
, ClassificationError
|
||||
or ClassificationError
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2761,7 +2762,7 @@ CosDistance
|
|||
|
||||
\end_inset
|
||||
|
||||
, CosDist
|
||||
or CosDist
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2792,7 +2793,7 @@ CosDistance(m1, m2)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
CosDist(m1, m2)
|
||||
CosDist(m1, m2) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -2816,7 +2817,7 @@ CosDistanceWithNegativeSamples
|
|||
|
||||
\end_inset
|
||||
|
||||
, CosWithNegSamples
|
||||
or CosWithNegSamples
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2862,7 +2863,7 @@ CosDistanceWithNegativeSamples(m1, m2, numShifts, numNegSamples)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
CosWithNegSamples(m1, m2, numShifts, numNegSamples)
|
||||
CosWithNegSamples(m1, m2, numShifts, numNegSamples) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -2895,7 +2896,7 @@ MatrixL1Reg
|
|||
|
||||
\end_inset
|
||||
|
||||
, L1Reg
|
||||
or L1Reg
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2915,7 +2916,7 @@ MatrixL2Reg
|
|||
|
||||
\end_inset
|
||||
|
||||
, L2Reg
|
||||
or L2Reg
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -2948,7 +2949,7 @@ MatrixL1Reg(m)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
L1Reg(m)
|
||||
L1Reg(m) #deprecated
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
@ -2958,7 +2959,7 @@ MatrixL2Reg(m)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
L2Reg(m)
|
||||
L2Reg(m) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -3063,7 +3064,7 @@ PerDimMeanVarNormalization
|
|||
|
||||
\end_inset
|
||||
|
||||
, PerDimMVNorm
|
||||
or PerDimMVNorm
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -3095,7 +3096,7 @@ PerDimMeanVarNormalization(m, mean, invStdDev)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
PerDimMVNorm(m, mean, invStdDev)
|
||||
PerDimMVNorm(m, mean, invStdDev) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -3128,7 +3129,7 @@ PerDimMeanVarDeNormalization
|
|||
|
||||
\end_inset
|
||||
|
||||
, PerDimMVDeNorm
|
||||
or PerDimMVDeNorm
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -3163,7 +3164,7 @@ PerDimMeanVarDeNormalization(m, mean, invStdDev)
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
PerDimMVDeNorm(m, mean, invStdDev)
|
||||
PerDimMVDeNorm(m, mean, invStdDev) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -3249,7 +3250,7 @@ Convolution
|
|||
|
||||
\end_inset
|
||||
|
||||
, Convolve
|
||||
or Convolve
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -3311,7 +3312,7 @@ Convolve(w, image, kernelWidth, kernelHeight,
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
maxTempMemSizeInSamples=0])
|
||||
maxTempMemSizeInSamples=0]) #deprecated
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -5266,7 +5267,7 @@ SetInput
|
|||
|
||||
\end_inset
|
||||
|
||||
, SetNodeInput
|
||||
or SetNodeInput
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -5326,7 +5327,7 @@ SetInputs
|
|||
|
||||
\end_inset
|
||||
|
||||
, SetNodeInputs
|
||||
or SetNodeInputs
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -5592,7 +5593,7 @@ Remove
|
|||
|
||||
\end_inset
|
||||
|
||||
, RemoveNode
|
||||
or RemoveNode
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -5612,7 +5613,7 @@ Delete
|
|||
|
||||
\end_inset
|
||||
|
||||
, DeleteNode
|
||||
or DeleteNode
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
|
@ -5638,12 +5639,12 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
Remove(node, [node2, node3])
|
||||
Remove(node, [node2, node3]) #deprecated
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
Delete(node, [node2, node3])
|
||||
Delete(node, [node2, node3]) #deprecated
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
|
@ -125,7 +125,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp.config
|
||||
cntk configFile=yourExp.config
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -4418,6 +4418,162 @@ ndlMacros
|
|||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
SVD Command
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
SVD Command
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This command conducts SVD decomposition for learnable parameters.
|
||||
For example:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset listings
|
||||
inline false
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
svd=[
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
action=SVD
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
modelPath=train
|
||||
\backslash
|
||||
lstm.model.67
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
outputmodelPath=train
|
||||
\backslash
|
||||
lstm.model.svd
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
SVDConfig=NodeConfigs
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
]
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
Here we list the associated parameter blocks.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
modelPath
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
modelPath – specifies where to load the initial model
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
outputmodelPath
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
outputmodelPath – specifies where to save the revised model
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
\begin_inset Index idx
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
SVDConfig
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
SVDConfig – a config file which specifies how the SVD is performed for different
|
||||
groups of nodes.
|
||||
This config is in a two-column format:
|
||||
\end_layout
|
||||
|
||||
\begin_deeper
|
||||
\begin_layout Standard
|
||||
\begin_inset listings
|
||||
inline false
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
<NodeNameRegex> <float>
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The first column is a regular expression which will match the node name
|
||||
in one group.
|
||||
The second column is a float indicating what percentage of SVD-energy will
|
||||
be kept after SVD, where SVD-energy is defined as the sum of singular values.
|
||||
For example, the config
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset listings
|
||||
inline false
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
LSTMoutput[1-3].Wx[ifco] 0.4
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
LSTMoutput[1-3].Wh[ifco] 0.6
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
will cause a more aggressive SVD (0.4) decomposition for the non-recurrent
|
||||
connections (from x to i,f,c,o gates) in LSTM and less aggressive SVD decomposi
|
||||
tion for recurrent connections (from h to i,f,c,o gates), where the parameter
|
||||
names are defined in the NDL.
|
||||
\end_layout
|
||||
|
||||
\end_deeper
|
||||
\begin_layout Subsection
|
||||
Dumpnode Command
|
||||
\begin_inset Index idx
|
||||
|
@ -5298,7 +5454,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp.config
|
||||
cntk configFile=yourExp.config
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -5418,7 +5574,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp.config stderr=c:
|
||||
cntk configFile=yourExp.config stderr=c:
|
||||
\backslash
|
||||
temp
|
||||
\backslash
|
||||
|
@ -5446,7 +5602,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp.config mnistTrain=[minibatchSize=256]
|
||||
cntk configFile=yourExp.config mnistTrain=[minibatchSize=256]
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -5461,7 +5617,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp.config mnistTrain=[reader=[file=mynewfile.txt]]
|
||||
cntk configFile=yourExp.config mnistTrain=[reader=[file=mynewfile.txt]]
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -5506,12 +5662,12 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp1.config+yourExp2.config
|
||||
cntk configFile=yourExp1.config+yourExp2.config
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp1.config configFile=yourExp2.config
|
||||
cntk configFile=yourExp1.config configFile=yourExp2.config
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -5531,8 +5687,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp1.config mnistTrain=[reader=[file=mynewfile.txt]]
|
||||
|
||||
cntk configFile=yourExp1.config mnistTrain=[reader=[file=mynewfile.txt]]
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -5555,8 +5710,8 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp1.config+yourExp2.config var1=value configFile=yourExp3.con
|
||||
fig
|
||||
cntk configFile=yourExp1.config+yourExp2.config var1=value configFile=yourExp3.conf
|
||||
ig
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -5597,7 +5752,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp2.config
|
||||
cntk configFile=yourExp2.config
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -5612,7 +5767,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=yourExp1.config+yourExp2.config
|
||||
cntk configFile=yourExp1.config+yourExp2.config
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
|
@ -819,7 +819,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn.exe configFile=Simple.config
|
||||
cntk configFile=Simple.config
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -838,7 +838,7 @@ status open
|
|||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
cn configFile=Simple.config
|
||||
cntk configFile=Simple.config
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
|
@ -12,7 +12,7 @@ Modify the following files:
|
|||
* all SCP files (lists of files) in "lib/scp" to point to your feature files
|
||||
|
||||
Run the command line with both globals.config and the desired config, separated by a +
|
||||
* for example: cn.exe configFile=globals.config+TIMIT_TrainSimpleNetwork.config
|
||||
* for example: cntk configFile=globals.config+TIMIT_TrainSimpleNetwork.config
|
||||
* note that full paths to config files need to be provided if you are not inside the config directory
|
||||
|
||||
Path Definitions:
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
ExpDir=\\speechstore5\transient\kaishengy\exp\lm\fnnlm
|
||||
ConfigDir=\\speechstore5\userdata\kaishengy\exp\lm\setup
|
||||
DataDir=\\speechstore5\transient\kaishengy\data\LM\PennTreeBank
|
||||
ExpDir=D:\zhaoyg\2015-5-6\cntk\ExampleSetups\LM\LSTMLM\
|
||||
ConfigDir=D:\zhaoyg\2015-5-6\cntk\ExampleSetups\LM\LSTMLM\
|
||||
DataDir=D:\zhaoyg\2015-5-6\cntk\ExampleSetups\LM\LSTMLM\
|
||||
|
|
|
@ -0,0 +1,432 @@
|
|||
# configuration file for class based RNN training
|
||||
|
||||
ExpFolder=$ExpDir$
|
||||
ConfigFolder=$ConfigDir$
|
||||
DataFolder=$DataDir$
|
||||
|
||||
stderr=$ExpFolder$
|
||||
numCPUThreads=4
|
||||
# command=dumpNodeInfo
|
||||
#command=train
|
||||
#command=test
|
||||
command=writeWordAndClassInfo:train:test
|
||||
command=train:test
|
||||
type=double
|
||||
|
||||
DEVICEID=-1
|
||||
|
||||
NOISE=100
|
||||
RATE=0.06
|
||||
VOCABSIZE=10000
|
||||
CLASSSIZE=50
|
||||
makeMode=true
|
||||
TRAINFILE=ptb.train.cntk.txt
|
||||
VALIDFILE=ptb.valid.cntk.txt
|
||||
TESTFILE=ptb.test.cntk.txt
|
||||
|
||||
#number of threads
|
||||
nthreads=4
|
||||
|
||||
writeWordAndClassInfo=[
|
||||
action=writeWordAndClass
|
||||
inputFile=$DataFolder$\$TRAINFILE$
|
||||
outputVocabFile=$DataFolder$\vocab.txt
|
||||
outputWord2Cls=$ExpFolder$\word2cls.txt
|
||||
outputCls2Index=$ExpFolder$\cls2idx.txt
|
||||
vocabSize=$VOCABSIZE$
|
||||
cutoff=0
|
||||
printValues=true
|
||||
]
|
||||
|
||||
dumpNodeInfo=[
|
||||
action=dumpnode
|
||||
modelPath=$ExpFolder$\modelRnnCNTK
|
||||
#nodeName=W0
|
||||
printValues=true
|
||||
]
|
||||
|
||||
devtest=[action=devtest]
|
||||
|
||||
train=[
|
||||
action=train
|
||||
minibatchSize=10
|
||||
traceLevel=1
|
||||
deviceId=$DEVICEID$
|
||||
epochSize=4430000
|
||||
# which is 886 * 5000
|
||||
recurrentLayer=1
|
||||
defaultHiddenActivity=0.1
|
||||
useValidation=true
|
||||
rnnType=NCELSTM
|
||||
#CLASSLSTM
|
||||
|
||||
# uncomment below and comment SimpleNetworkBuilder section to use NDL to train RNN LM
|
||||
# NDLNetworkBuilder=[
|
||||
# networkDescription=$ConfigFolder$\rnnlm.ndl
|
||||
# ]
|
||||
|
||||
SimpleNetworkBuilder=[
|
||||
trainingCriterion=NoiseContrastiveEstimationNode
|
||||
evalCriterion=NoiseContrastiveEstimationNode
|
||||
nodeType=Sigmoid
|
||||
initValueScale=6.0
|
||||
layerSizes=$VOCABSIZE$:200:$VOCABSIZE$
|
||||
addPrior=false
|
||||
addDropoutNodes=false
|
||||
applyMeanVarNorm=false
|
||||
uniformInit=true;
|
||||
|
||||
# these are for the class information for class-based language modeling
|
||||
vocabSize=$VOCABSIZE$
|
||||
#nbrClass=$CLASSSIZE$
|
||||
noise_number=$NOISE$
|
||||
]
|
||||
|
||||
# configuration file, base parameters
|
||||
SGD=[
|
||||
makeMode=true
|
||||
learningRatesPerSample=$RATE$
|
||||
momentumPerMB=0
|
||||
gradientClippingWithTruncation=true
|
||||
clippingThresholdPerSample=15.0
|
||||
maxEpochs=40
|
||||
unroll=false
|
||||
numMBsToShowResult=2000
|
||||
# gradUpdateType=AdaGrad
|
||||
gradUpdateType=None
|
||||
|
||||
modelPath=$ExpFolder$\modelRnnCNTK
|
||||
loadBestModel=true
|
||||
|
||||
# settings for Auto Adjust Learning Rate
|
||||
AutoAdjust=[
|
||||
# auto learning rate adjustment
|
||||
autoAdjustLR=adjustafterepoch
|
||||
reduceLearnRateIfImproveLessThan=0.001
|
||||
continueReduce=false
|
||||
increaseLearnRateIfImproveMoreThan=1000000000
|
||||
learnRateDecreaseFactor=0.5
|
||||
learnRateIncreaseFactor=1.382
|
||||
numMiniBatch4LRSearch=100
|
||||
numPrevLearnRates=5
|
||||
numBestSearchEpoch=1
|
||||
]
|
||||
|
||||
dropoutRate=0.0
|
||||
]
|
||||
|
||||
reader=[
|
||||
readerType=LMSequenceReader
|
||||
randomize=None
|
||||
nbruttsineachrecurrentiter=10
|
||||
|
||||
# word class info
|
||||
wordclass=$DataFolder$\vocab.txt
|
||||
noise_number=$NOISE$
|
||||
mode=nce
|
||||
# if writerType is set, we will cache to a binary file
|
||||
# if the binary file exists, we will use it instead of parsing this file
|
||||
# writerType=BinaryReader
|
||||
|
||||
#### write definition
|
||||
wfile=$ExpFolder$\sequenceSentence.bin
|
||||
#wsize - inital size of the file in MB
|
||||
# if calculated size would be bigger, that is used instead
|
||||
wsize=256
|
||||
|
||||
#wrecords - number of records we should allocate space for in the file
|
||||
# files cannot be expanded, so this should be large enough. If known modify this element in config before creating file
|
||||
wrecords=1000
|
||||
#windowSize - number of records we should include in BinaryWriter window
|
||||
windowSize=$VOCABSIZE$
|
||||
|
||||
file=$DataFolder$\$TRAINFILE$
|
||||
|
||||
#additional features sections
|
||||
#for now store as expanded category data (including label in)
|
||||
features=[
|
||||
# sentence has no features, so need to set dimension to zero
|
||||
dim=0
|
||||
### write definition
|
||||
sectionType=data
|
||||
]
|
||||
# sequence break table, list indexes into sequence records, so we know when a sequence starts/stops
|
||||
sequence=[
|
||||
dim=1
|
||||
wrecords=2
|
||||
### write definition
|
||||
sectionType=data
|
||||
]
|
||||
#labels sections
|
||||
labelIn=[
|
||||
dim=1
|
||||
# vocabulary size
|
||||
labelDim=$VOCABSIZE$
|
||||
labelMappingFile=$ExpFolder$\sentenceLabels.txt
|
||||
labelType=Category
|
||||
beginSequence="</s>"
|
||||
endSequence="</s>"
|
||||
|
||||
#### Write definition ####
|
||||
# sizeof(unsigned) which is the label index type
|
||||
elementSize=4
|
||||
sectionType=labels
|
||||
mapping=[
|
||||
#redefine number of records for this section, since we don't need to save it for each data record
|
||||
wrecords=11
|
||||
#variable size so use an average string size
|
||||
elementSize=10
|
||||
sectionType=labelMapping
|
||||
]
|
||||
category=[
|
||||
dim=11
|
||||
#elementSize=sizeof(ElemType) is default
|
||||
sectionType=categoryLabels
|
||||
]
|
||||
]
|
||||
#labels sections
|
||||
labels=[
|
||||
dim=1
|
||||
labelType=NextWord
|
||||
beginSequence="O"
|
||||
endSequence="O"
|
||||
|
||||
# vocabulary size
|
||||
labelDim=$VOCABSIZE$
|
||||
|
||||
labelMappingFile=$ExpFolder$\sentenceLabels.out.txt
|
||||
#### Write definition ####
|
||||
# sizeof(unsigned) which is the label index type
|
||||
elementSize=4
|
||||
sectionType=labels
|
||||
mapping=[
|
||||
#redefine number of records for this section, since we don't need to save it for each data record
|
||||
wrecords=3
|
||||
#variable size so use an average string size
|
||||
elementSize=10
|
||||
sectionType=labelMapping
|
||||
]
|
||||
category=[
|
||||
dim=3
|
||||
#elementSize=sizeof(ElemType) is default
|
||||
sectionType=categoryLabels
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
cvReader=[
|
||||
# reader to use
|
||||
readerType=LMSequenceReader
|
||||
randomize=None
|
||||
mode=softmax
|
||||
# word class info
|
||||
wordclass=$DataFolder$\vocab.txt
|
||||
|
||||
# if writerType is set, we will cache to a binary file
|
||||
# if the binary file exists, we will use it instead of parsing this file
|
||||
# writerType=BinaryReader
|
||||
|
||||
#### write definition
|
||||
wfile=$ExpFolder$\sequenceSentence.valid.bin
|
||||
#wsize - inital size of the file in MB
|
||||
# if calculated size would be bigger, that is used instead
|
||||
wsize=256
|
||||
|
||||
#wrecords - number of records we should allocate space for in the file
|
||||
# files cannot be expanded, so this should be large enough. If known modify this element in config before creating file
|
||||
wrecords=1000
|
||||
#windowSize - number of records we should include in BinaryWriter window
|
||||
windowSize=$VOCABSIZE$
|
||||
|
||||
file=$DataFolder$\$VALIDFILE$
|
||||
|
||||
#additional features sections
|
||||
#for now store as expanded category data (including label in)
|
||||
features=[
|
||||
# sentence has no features, so need to set dimension to zero
|
||||
dim=0
|
||||
### write definition
|
||||
sectionType=data
|
||||
]
|
||||
# sequence break table, list indexes into sequence records, so we know when a sequence starts/stops
|
||||
sequence=[
|
||||
dim=1
|
||||
wrecords=2
|
||||
### write definition
|
||||
sectionType=data
|
||||
]
|
||||
#labels sections
|
||||
# it should be the same as that in the training set
|
||||
labelIn=[
|
||||
dim=1
|
||||
|
||||
# vocabulary size
|
||||
labelDim=$VOCABSIZE$
|
||||
labelMappingFile=$ExpFolder$\sentenceLabels.out.txt
|
||||
labelType=Category
|
||||
beginSequence="</s>"
|
||||
endSequence="</s>"
|
||||
|
||||
#### Write definition ####
|
||||
# sizeof(unsigned) which is the label index type
|
||||
elementSize=4
|
||||
sectionType=labels
|
||||
mapping=[
|
||||
#redefine number of records for this section, since we don't need to save it for each data record
|
||||
wrecords=11
|
||||
#variable size so use an average string size
|
||||
elementSize=10
|
||||
sectionType=labelMapping
|
||||
]
|
||||
category=[
|
||||
dim=11
|
||||
#elementSize=sizeof(ElemType) is default
|
||||
sectionType=categoryLabels
|
||||
]
|
||||
]
|
||||
#labels sections
|
||||
labels=[
|
||||
dim=1
|
||||
labelType=NextWord
|
||||
beginSequence="O"
|
||||
endSequence="O"
|
||||
|
||||
labelDim=$VOCABSIZE$
|
||||
labelMappingFile=$ExpFolder$\sentenceLabels.out.txt
|
||||
#### Write definition ####
|
||||
# sizeof(unsigned) which is the label index type
|
||||
elementSize=4
|
||||
sectionType=labels
|
||||
mapping=[
|
||||
#redefine number of records for this section, since we don't need to save it for each data record
|
||||
wrecords=3
|
||||
#variable size so use an average string size
|
||||
elementSize=10
|
||||
sectionType=labelMapping
|
||||
]
|
||||
category=[
|
||||
dim=3
|
||||
#elementSize=sizeof(ElemType) is default
|
||||
sectionType=categoryLabels
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
test=[
|
||||
action=eval
|
||||
|
||||
# correspond to the number of words/characteres to train in a minibatch
|
||||
minibatchSize=1
|
||||
# need to be small since models are updated for each minibatch
|
||||
traceLevel=1
|
||||
deviceId=$DEVICEID$
|
||||
epochSize=4430000
|
||||
# which is 886 * 5000
|
||||
recurrentLayer=1
|
||||
defaultHiddenActivity=0.1
|
||||
useValidation=true
|
||||
rnnType=NCELSTM
|
||||
|
||||
modelPath=$ExpFolder$\modelRnnCNTK
|
||||
|
||||
reader=[
|
||||
# reader to use
|
||||
readerType=LMSequenceReader
|
||||
randomize=None
|
||||
mode=softmax
|
||||
# word class info
|
||||
wordclass=$DataFolder$\vocab.txt
|
||||
|
||||
# if writerType is set, we will cache to a binary file
|
||||
# if the binary file exists, we will use it instead of parsing this file
|
||||
# writerType=BinaryReader
|
||||
|
||||
#### write definition
|
||||
wfile=$ExpFolder$\sequenceSentence.bin
|
||||
#wsize - inital size of the file in MB
|
||||
# if calculated size would be bigger, that is used instead
|
||||
wsize=256
|
||||
|
||||
# wrecords - number of records we should allocate space for in the file
|
||||
# files cannot be expanded, so this should be large enough. If known modify this element in config before creating file
|
||||
wrecords=1000
|
||||
# windowSize - number of records we should include in BinaryWriter window
|
||||
windowSize=$VOCABSIZE$
|
||||
|
||||
file=$DataFolder$\$TESTFILE$
|
||||
|
||||
#additional features sections
|
||||
#for now store as expanded category data (including label in)
|
||||
features=[
|
||||
# sentence has no features, so need to set dimension to zero
|
||||
dim=0
|
||||
### write definition
|
||||
sectionType=data
|
||||
]
|
||||
# sequence break table, list indexes into sequence records, so we know when a sequence starts/stops
|
||||
sequence=[
|
||||
dim=1
|
||||
wrecords=2
|
||||
### write definition
|
||||
sectionType=data
|
||||
]
|
||||
#labels sections
|
||||
labelIn=[
|
||||
dim=1
|
||||
|
||||
# vocabulary size
|
||||
labelDim=$VOCABSIZE$
|
||||
labelMappingFile=$ExpFolder$\sentenceLabels.txt
|
||||
labelType=Category
|
||||
beginSequence="</s>"
|
||||
endSequence="</s>"
|
||||
|
||||
#### Write definition ####
|
||||
# sizeof(unsigned) which is the label index type
|
||||
elementSize=4
|
||||
sectionType=labels
|
||||
mapping=[
|
||||
#redefine number of records for this section, since we don't need to save it for each data record
|
||||
wrecords=11
|
||||
#variable size so use an average string size
|
||||
elementSize=10
|
||||
sectionType=labelMapping
|
||||
]
|
||||
category=[
|
||||
dim=11
|
||||
#elementSize=sizeof(ElemType) is default
|
||||
sectionType=categoryLabels
|
||||
]
|
||||
]
|
||||
#labels sections
|
||||
labels=[
|
||||
dim=1
|
||||
labelType=NextWord
|
||||
beginSequence="O"
|
||||
endSequence="O"
|
||||
|
||||
# vocabulary size
|
||||
labelDim=$VOCABSIZE$
|
||||
|
||||
labelMappingFile=$ExpFolder$\sentenceLabels.out.txt
|
||||
#### Write definition ####
|
||||
# sizeof(unsigned) which is the label index type
|
||||
elementSize=4
|
||||
sectionType=labels
|
||||
mapping=[
|
||||
#redefine number of records for this section, since we don't need to save it for each data record
|
||||
wrecords=3
|
||||
#variable size so use an average string size
|
||||
elementSize=10
|
||||
sectionType=labelMapping
|
||||
]
|
||||
category=[
|
||||
dim=3
|
||||
#elementSize=sizeof(ElemType) is default
|
||||
sectionType=categoryLabels
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
|
@ -0,0 +1,477 @@
|
|||
load=ndlMacroDefine
|
||||
#run=ndlFull
|
||||
#run=ndlTestMDN
|
||||
#run=ndlTestGMM
|
||||
#run=ndlTestCosDist
|
||||
#run=ndlMacroUseCNNSubSample2
|
||||
run=ndlMacroUseCNN
|
||||
|
||||
ndlTestCosDist=[
|
||||
# constants defined
|
||||
# Sample, Hidden, and Label dimensions
|
||||
SDim=784
|
||||
HDim=256
|
||||
LDim=10
|
||||
|
||||
features=Input(SDim, tag=feature)
|
||||
labels=Input(LDim, tag=label)
|
||||
|
||||
# compute mean/stddev for mean/stddev normalization
|
||||
fmean = Mean(features);
|
||||
finvstd=InvStdDev(features)
|
||||
finput=PerDimMeanVarNormalization(features, fmean, finvstd)
|
||||
|
||||
# Layer operations
|
||||
L1 = RBFF(finput, HDim, SDim)
|
||||
L2 = RBFF(L1, HDim, HDim)
|
||||
L3 = RBFF(L2, LDim, HDim)
|
||||
L4 = SoftMax(L3);
|
||||
CD = CosDistance(L4, labels);
|
||||
CDAll=SumElements(CD)
|
||||
NCD=Negate(CDALL, tag=Criteria)
|
||||
Err=ErrorPrediction(labels, L4, tag=Eval)
|
||||
|
||||
# rootNodes defined here
|
||||
OutputNodes=(L4)
|
||||
]
|
||||
|
||||
ndlTestGMM=[
|
||||
# constants defined
|
||||
# Sample, Hidden, and Label dimensions
|
||||
SDim=784
|
||||
HDim=10
|
||||
LDim=10
|
||||
|
||||
features=Input(SDim, tag=feature)
|
||||
labels=Input(LDim, tag=label)
|
||||
|
||||
# Layer operations
|
||||
L1=RBFF(features, HDim, SDim)
|
||||
L2=RBFF(L1, HDim, HDim)
|
||||
L3=BFF(L2, HDim, HDim)
|
||||
|
||||
GMMComponent=4
|
||||
SizeOfAllMeans=40
|
||||
|
||||
UnnormedPrior=Parameter(GMMComponent, 1)
|
||||
Means=Parameter(SizeOfAllMeans, 1)
|
||||
LogStddev=Parameter(GMMComponent, 1)
|
||||
|
||||
LL=GMMLL(UnnormedPrior, Means, LogStddev, L3)
|
||||
LLAll=SumElements(LL)
|
||||
NLL=Negate(LLALL, tag=Criteria)
|
||||
|
||||
# rootNodes defined here
|
||||
OutputNodes=(NLL)
|
||||
EvalNodes=(NLL)
|
||||
]
|
||||
|
||||
ndlTestMDN=[
|
||||
# constants defined
|
||||
# Sample, Hidden, and Label dimensions
|
||||
SDim=784
|
||||
HDim=256
|
||||
LDim=10
|
||||
|
||||
features=Input(SDim, tag=feature)
|
||||
labels=Input(LDim, tag=label)
|
||||
|
||||
# Layer operations
|
||||
L1=RBFF(features, HDim, SDim)
|
||||
L2=RBFF(L1, HDim, HDim)
|
||||
L3=RBFF(L2, HDim, HDim)
|
||||
|
||||
GMMComponent=4
|
||||
SizeOfAllMeans=40
|
||||
|
||||
UnnormedPrior0 = BFF(L3, GMMComponent, HDim)
|
||||
UnnormedPrior1=Tanh(UnnormedPrior0)
|
||||
scaleFPrior=Const(2)
|
||||
UnnormedPrior=Scale(scaleFPrior, UnnormedPrior1)
|
||||
|
||||
Means=BFF(L3, SizeOfAllMeans, HDim)
|
||||
|
||||
#it's important to control the range of logstddev
|
||||
LogStddev0=BFF(L3, GMMComponent, MDim)
|
||||
LogStddev1=Tanh(LogStddev0)
|
||||
scaleFStddev=Const(2)
|
||||
LogStddev=Scale(scaleFStddev, LogStddev1)
|
||||
|
||||
LL=GMMLL(UnnormedPrior, Means, LogStddev, labels)
|
||||
LLAll=SumElements(LL)
|
||||
NLL=Negate(LLALL, tag=Criteria)
|
||||
|
||||
# rootNodes defined here
|
||||
OutputNodes=(NLL)
|
||||
EvalNodes=(NLL)
|
||||
]
|
||||
|
||||
ndlFull=[
|
||||
SDim=784
|
||||
HDim=256
|
||||
LDim=10
|
||||
B0=Parameter(HDim)
|
||||
W0=Parameter(HDim, SDim)
|
||||
features=Input(SDim)
|
||||
labels=Input(LDim)
|
||||
mean0=Mean(features)
|
||||
invstd0=InvStdDev(features)
|
||||
normedFeat=PerDimMeanVarNormalization(features, mean0, invstd0)
|
||||
Times1=Times(W0, normedFeat)
|
||||
Plus1=Plus(Times1, B0)
|
||||
RL1=RectifiedLinear(Plus1)
|
||||
B1=Parameter(LDim, 1)
|
||||
W1=Parameter(LDim, HDim)
|
||||
Times2=Times(W1, RL1)
|
||||
Plus2=Plus(Times2, B1)
|
||||
#LogSM=LogSoftmax(Plus2)
|
||||
#SM=Exp(LogSM)
|
||||
#SM=Softmax(Plus2)
|
||||
#CE=CrossEntropy(labels, SM)
|
||||
CE=CrossEntropyWithSoftmax(labels, Plus2)
|
||||
ErrPredict=ErrorPrediction(labels, Plus2)
|
||||
FeatureNodes=(features)
|
||||
LabelNodes=(labels)
|
||||
CriteriaNodes=(CE)
|
||||
EvalNodes=(ErrPredict)
|
||||
OutputNodes=(Plus2)
|
||||
]
|
||||
|
||||
ndlMacroDefine=[
|
||||
# Macro definitions
|
||||
#inline Rectified Linear Feed Forward
|
||||
RFF_R(x1, w1, b1)=RectifiedLinear(Plus(Times(w1,x1),b1))
|
||||
#Feed Forward
|
||||
FF(X1, W1, B1)
|
||||
[
|
||||
T=Times(W1,X1);
|
||||
P=Plus(T, B1);
|
||||
]
|
||||
#Base feed Forward network, defines Bias and wieght parameters
|
||||
BFF(in, rows, cols)
|
||||
{
|
||||
B=Parameter(rows, init=fixedvalue, value=0)
|
||||
W=Parameter(rows, cols)
|
||||
FF = FF(in, w, b)
|
||||
}
|
||||
#RectifiedLinear Base Feed Forward
|
||||
RBFF(in,rowCount,colCount)
|
||||
{
|
||||
BFF = BFF(in, rowCount, colCount);
|
||||
RL = RectifiedLinear(BFF);
|
||||
}
|
||||
#Rectified Linear Feed Forward
|
||||
RFF(X2,W2,B2)=[
|
||||
FF = FF(X2, W2, B2);
|
||||
RL = RectifiedLinear(FF);
|
||||
]
|
||||
#RectifiedLinear Feed Forward with Dropout
|
||||
RFFD(X3,W3,B3)
|
||||
{
|
||||
RFF=RFF(X3, W3, B3)
|
||||
DO=Dropout(RFF)
|
||||
}
|
||||
#Sigmoid Base Feed Forward
|
||||
SBFF(in,rowCount,colCount)
|
||||
{
|
||||
BFF = BFF(in, rowCount, colCount);
|
||||
S = Sigmoid(BFF);
|
||||
}
|
||||
#Sigmoid Feed Forward
|
||||
SFF(X2,W2,B2)=[
|
||||
FF = FF(X2, W2, B2);
|
||||
S = Sigmoid(FF);
|
||||
]
|
||||
#Sigmoid Feed Forward with Dropout
|
||||
SFFD(X3,W3,B3)
|
||||
{
|
||||
SFF=SFF(X3, W3, B3)
|
||||
DO=Dropout(SFF)
|
||||
}
|
||||
#SoftMax Feed Forward
|
||||
SMFF(x,y,z, labels)
|
||||
{
|
||||
FF = FF(x,y,z);
|
||||
SM = CrossEntropyWithSoftmax(labels, FF)
|
||||
}
|
||||
#SoftMax Base Feed Forward
|
||||
SMBFF(x,r,c, labels)
|
||||
{
|
||||
BFF = BFF(x,r,c);
|
||||
SM = CrossEntropyWithSoftmax(labels, BFF)
|
||||
}
|
||||
RFFD_R(x1, w1, b1)={Dropout(RectifiedLinear(Plus(Times(w1,x1),b1)))}
|
||||
|
||||
WtObjFcn(o1,w1,o2,w2)
|
||||
{
|
||||
A1=Constant(w1)
|
||||
A2=Constant(w2)
|
||||
T1=Times(A1,o1)
|
||||
T2=Times(A2,o2)
|
||||
O=Plus(T1,T2)
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
ndlMacroUse2=[
|
||||
# constants defined
|
||||
# Sample, Hidden, and Label dimensions
|
||||
SDim=784
|
||||
HDim=256
|
||||
LDim=10
|
||||
|
||||
features=Input(SDim, tag=feature)
|
||||
labels=Input(LDim, tag=label)
|
||||
|
||||
# compute mean/stddev for mean/stddev normalization
|
||||
fmean = Mean(features);
|
||||
finvstd=InvStdDev(features)
|
||||
finput=PerDimMeanVarNormalization(features, fmean, finvstd)
|
||||
|
||||
# Layer operations
|
||||
L1 = RBFF(finput, HDim, SDim)
|
||||
L2 = RBFF(L1, HDim, HDim)
|
||||
L3 = RBFF(L2, HDim, HDim)
|
||||
CE = SMBFF(L3, LDim, HDim, labels, tag=Criteria)
|
||||
Err=ErrorPrediction(labels, CE.BFF, tag=Eval)
|
||||
|
||||
# rootNodes defined here
|
||||
OutputNodes=(CE.BFF)
|
||||
]
|
||||
ndlMacroUseCNNSubSample2ZeroPadding=[
|
||||
# constants defined
|
||||
# Sample, Hidden, and Label dimensions
|
||||
SDim=784
|
||||
LDim=10
|
||||
|
||||
features=Input(SDim, tag=feature)
|
||||
labels=Input(LDim, tag=label)
|
||||
|
||||
#convolution
|
||||
inputWidth=28
|
||||
inputHeight=28
|
||||
inputChannels=1
|
||||
kernelWidth=5
|
||||
kernelHeight=5
|
||||
outputChannels=24
|
||||
horizontalSubsample=2
|
||||
verticalSubsample=2
|
||||
|
||||
# weight[outputChannels, kernelWidth * kernelHeight * inputChannels]
|
||||
cvweight=Parameter(outputChannels, 25)
|
||||
cv = Convolution(cvweight, features, inputWidth, inputHeight, inputChannels, kernelWidth, kernelHeight, outputChannels,horizontalSubsample, verticalSubsample, zeroPadding=true)
|
||||
|
||||
#one bias per channel
|
||||
cvbias=Parameter(outputChannels, 1)
|
||||
|
||||
cvplusbias=Plus(cv, cvbias);
|
||||
nlcv=Sigmoid(cvplusbias);
|
||||
|
||||
#outputWidth = (m_inputWidth-1)/m_horizontalSubsample + 1;
|
||||
outputWidth=14
|
||||
#outputHeight = (m_inputHeight-1)/m_verticalSubsample + 1;
|
||||
outputHeight=14
|
||||
|
||||
#maxpooling
|
||||
windowWidth=2
|
||||
windowHeight=2
|
||||
stepW=2
|
||||
stepH=2
|
||||
mp=MaxPooling(nlcv, outputWidth, outputHeight, outputChannels, windowWidth, windowHeight, stepW, stepH)
|
||||
|
||||
#m_outputWidth = (m_inputWidth-m_windowWidth)/m_horizontalSubsample + 1;
|
||||
mpoutputWidth=7
|
||||
#m_outputHeight = (m_inputHeight-m_windowHeight)/m_verticalSubsample + 1;
|
||||
mpoutputHeight=7
|
||||
#m_outputSizePerSample = m_outputWidth * m_outputHeight * m_channels;
|
||||
mpoutputSizePerSample=1176
|
||||
# Layer operations
|
||||
|
||||
HDim=128
|
||||
L1 = SBFF(mp, HDim, mpoutputSizePerSample)
|
||||
CE = SMBFF(L1, LDim, HDim, labels, tag=Criteria)
|
||||
Err=ErrorPrediction(labels, CE.BFF, tag=Eval)
|
||||
|
||||
# rootNodes defined here
|
||||
OutputNodes=(CE.BFF)
|
||||
]
|
||||
|
||||
ndlMacroUseCNNSubSample2=[
|
||||
# constants defined
|
||||
# Sample, Hidden, and Label dimensions
|
||||
SDim=784
|
||||
LDim=10
|
||||
|
||||
features=ImageInput(28,28, 1, tag=feature)
|
||||
labels=Input(LDim, tag=label)
|
||||
|
||||
#convolution
|
||||
inputWidth=28
|
||||
inputHeight=28
|
||||
inputChannels=1
|
||||
kernelWidth=5
|
||||
kernelHeight=5
|
||||
outputChannels=24
|
||||
horizontalSubsample=2
|
||||
verticalSubsample=2
|
||||
|
||||
# weight[outputChannels, kernelWidth * kernelHeight * inputChannels]
|
||||
cvweight=Parameter(outputChannels, 25)
|
||||
cv = Convolution(cvweight, features, kernelWidth, kernelHeight, outputChannels,horizontalSubsample, verticalSubsample, zeroPadding=false)
|
||||
|
||||
#one bias per channel
|
||||
cvbias=Parameter(outputChannels, 1)
|
||||
|
||||
cvplusbias=Plus(cv, cvbias);
|
||||
nlcv=Sigmoid(cvplusbias);
|
||||
#nlcv=Sigmoid(cv);
|
||||
|
||||
#outputWidth = (m_inputWidth-m_kernelWidth)/m_horizontalSubsample + 1;
|
||||
outputWidth=12
|
||||
#outputHeight = (m_inputHeight-m_kernelHeight)/m_verticalSubsample + 1;
|
||||
outputHeight=12
|
||||
|
||||
#maxpooling
|
||||
windowWidth=2
|
||||
windowHeight=2
|
||||
stepW=2
|
||||
stepH=2
|
||||
mp=MaxPooling(nlcv, windowWidth, windowHeight, stepW, stepH)
|
||||
|
||||
#m_outputWidth = (m_inputWidth-m_windowWidth)/m_horizontalSubsample + 1;
|
||||
mpoutputWidth=6
|
||||
#m_outputHeight = (m_inputHeight-m_windowHeight)/m_verticalSubsample + 1;
|
||||
mpoutputHeight=6
|
||||
#m_outputSizePerSample = m_outputWidth * m_outputHeight * m_channels;
|
||||
mpoutputSizePerSample=864
|
||||
# Layer operations
|
||||
|
||||
HDim=128
|
||||
L1 = SBFF(mp, HDim, mpoutputSizePerSample)
|
||||
CE = SMBFF(L1, LDim, HDim, labels, tag=Criteria)
|
||||
Err=ErrorPrediction(labels, CE.BFF, tag=Eval)
|
||||
|
||||
# rootNodes defined here
|
||||
OutputNodes=(CE.BFF)
|
||||
]
|
||||
|
||||
ndlMacroUseCNN=[
|
||||
# constants defined
|
||||
# Sample, Hidden, and Label dimensions
|
||||
inputWidth=28
|
||||
inputHeight=28
|
||||
inputChannels=1
|
||||
|
||||
SDim=784
|
||||
LDim=10
|
||||
|
||||
features=ImageInput(inputWidth, inputHeight, inputChannels, 1, tag=feature)
|
||||
labels=Input(LDim, tag=label)
|
||||
|
||||
#convolution
|
||||
kernelWidth=5
|
||||
kernelHeight=5
|
||||
outputChannels=24
|
||||
horizontalSubsample=1
|
||||
verticalSubsample=1
|
||||
|
||||
# weight[outputChannels, kernelWidth * kernelHeight * inputChannels]
|
||||
# cvweight=Parameter(outputChannels, 25)
|
||||
cvweight=Parameter(0, 0) #CNTK will derive the dimension automatically
|
||||
cv = Convolution(cvweight, features, kernelWidth, kernelHeight, outputChannels,horizontalSubsample, verticalSubsample, zeroPadding=false)
|
||||
|
||||
#one bias per channel
|
||||
cvbias=Parameter(outputChannels, 1)
|
||||
|
||||
cvplusbias=Plus(cv, cvbias);
|
||||
nlcv=Sigmoid(cvplusbias);
|
||||
|
||||
#maxpooling
|
||||
windowWidth=2
|
||||
windowHeight=2
|
||||
stepW=2
|
||||
stepH=2
|
||||
mp=MaxPooling(nlcv, windowWidth, windowHeight, stepW, stepH)
|
||||
|
||||
mpoutputSizePerSample=0
|
||||
# Layer operations
|
||||
|
||||
HDim=128
|
||||
L1 = SBFF(mp, HDim, 0)
|
||||
CE = SMBFF(L1, LDim, HDim, labels, tag=Criteria)
|
||||
Err=ErrorPrediction(labels, CE.BFF, tag=Eval)
|
||||
|
||||
# rootNodes defined here
|
||||
OutputNodes=(CE.BFF)
|
||||
]
|
||||
|
||||
ndlMacroUseNoBase=[
|
||||
# constants defined
|
||||
# Sample, Hidden, and Label dimensions
|
||||
SDim=784
|
||||
HDim=256
|
||||
LDim=10
|
||||
|
||||
# Weight, Bias, features and label inputs
|
||||
B0=Parameter(HDim, init=fixedvalue, value=0)
|
||||
W0=Parameter(HDim, SDim, init=uniform)
|
||||
B1=Parameter(HDim, init=fixedvalue, value=0)
|
||||
W1=Parameter(HDim, HDim, init=uniform)
|
||||
B2=Parameter(HDim, init=fixedvalue, value=0)
|
||||
W2=Parameter(HDim, HDim, init=uniform)
|
||||
BTop=Parameter(LDim, init=fixedvalue, value=0)
|
||||
WTop=Parameter(LDim, HDim, init=uniform)
|
||||
|
||||
features=Input(SDim, tag=feature)
|
||||
labels=Input(LDim, tag=label)
|
||||
|
||||
# Layer operations
|
||||
L1 = RFFD(features, HDim, SDim)
|
||||
L2 = RFFD(L1, HDim, HDim)
|
||||
L3 = RFFD(L2, HDim, HDim)
|
||||
CE = SMFF(L3, LDim, SDim, labels, tag=Criteria)
|
||||
Err=ErrorPrediction(labels, CE.BFF, tag=Eval)
|
||||
# rootNodes defined here
|
||||
OutputNodes=(CE.BFF)
|
||||
]
|
||||
|
||||
ndlMacroUseMask=[
|
||||
# constants defined
|
||||
# Sample, Hidden, and Label dimensions
|
||||
SDim=784
|
||||
HDim=256
|
||||
LDim=10
|
||||
|
||||
features=Input(SDim, tag=feature)
|
||||
labels=Input(LDim, tag=label)
|
||||
|
||||
# compute mean/stddev for mean/stddev normalization
|
||||
fmean = Mean(features);
|
||||
finvstd=InvStdDev(features)
|
||||
finput=PerDimMeanVarNormalization(features, fmean, finvstd)
|
||||
|
||||
# Layer operations
|
||||
L1 = RBFF(finput, HDim, SDim)
|
||||
L2 = RBFF(L1, HDim, HDim)
|
||||
L3 = RBFF(L2, HDim, HDim)
|
||||
|
||||
# mask layers
|
||||
ML1=RBFF(finput, HDim, SDim)
|
||||
ML2=RBFF(ML1, HDim, HDim)
|
||||
|
||||
# mask
|
||||
L4=ElementTimes(L3, ML2)
|
||||
|
||||
CE = SMBFF(L4, LDim, HDim, labels, tag=Criteria)
|
||||
Err=ErrorPrediction(labels, CE.BFF, tag=Eval)
|
||||
|
||||
# output nodes
|
||||
Prior=Mean(labels)
|
||||
LP=Log(Prior)
|
||||
O=Minus(CE.BFF, LP)
|
||||
|
||||
# rootNodes defined here
|
||||
OutputNodes=(O)
|
||||
CriteriaNodes=(CE)
|
||||
EvaluationNodes(Err)
|
||||
]
|
|
@ -12,11 +12,11 @@ Modify the following files:
|
|||
* all SCP files (lists of files) in "lib/scp" to point to your feature files
|
||||
|
||||
Run the command line with both globals.config and the desired config, separated by a +
|
||||
* for example: cn.exe configFile=globals.config+rnnlu.config
|
||||
* for example: cntk configFile=globals.config+rnnlu.config
|
||||
|
||||
* note that full paths to config files need to be provided if you are not inside the config directory
|
||||
* for example
|
||||
* C:\dev\cntk5\CNTKSolution\x64\Release\cn.exe configFile=C:\dev\cntk5\ExampleSetups\SLU\globals.config+C:\dev\cntk5\ExampleSetups\SLU\rnnlu.config
|
||||
* C:\dev\cntk5\CNTKSolution\x64\Release\cntk configFile=C:\dev\cntk5\ExampleSetups\SLU\globals.config+C:\dev\cntk5\ExampleSetups\SLU\rnnlu.config
|
||||
|
||||
Scoring
|
||||
* ./score.sh
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "ModelEditLanguage.h"
|
||||
#include "SGD.h"
|
||||
#include <string>
|
||||
#include <basetypes.h>
|
||||
#include "Basics.h"
|
||||
#include "commandArgUtil.h"
|
||||
#include "SimpleEvaluator.h"
|
||||
#include "SimpleOutputWriter.h"
|
||||
|
@ -39,6 +39,7 @@
|
|||
#include <set>
|
||||
#include "BestGpu.h"
|
||||
|
||||
|
||||
// MPI builds on windows require the following installed to "c:\program files\Microsoft MPI\"
|
||||
// HPC Pack 2012 R2 MS-MPI Redistributable Package
|
||||
// http://www.microsoft.com/en-us/download/details.aspx?id=41634
|
||||
|
@ -329,6 +330,8 @@ namespace Microsoft {
|
|||
return TrainingCriterion::CrossEntropyWithSoftmax;
|
||||
else if (s == L"squareerror")
|
||||
return TrainingCriterion::SquareError;
|
||||
else if (s == L"noisecontrastiveestimationnode")
|
||||
return TrainingCriterion::NCECrossEntropyWithSoftmax;
|
||||
else if (s != L"classcrossentropywithsoftmax") // (twisted logic to keep compiler happy w.r.t. not returning from LogicError)
|
||||
LogicError("trainingCriterion: Invalid trainingCriterion value. Valid values are (CrossEntropyWithSoftmax | SquareError | ClassCrossEntropyWithSoftmax)");
|
||||
return TrainingCriterion::ClassCrossEntropyWithSoftmax;
|
||||
|
@ -343,6 +346,8 @@ namespace Microsoft {
|
|||
return EvalCriterion::CrossEntropyWithSoftmax;
|
||||
else if (s == L"classcrossentropywithsoftmax")
|
||||
return EvalCriterion::ClassCrossEntropyWithSoftmax;
|
||||
else if (s == L"noisecontrastiveestimationnode")
|
||||
return EvalCriterion::NCECrossEntropyWithSoftmax;
|
||||
else if (s != L"squareerror")
|
||||
LogicError("evalCriterion: Invalid trainingCriterion value. Valid values are (ErrorPrediction | CrossEntropyWithSoftmax | SquareError)");
|
||||
return EvalCriterion::SquareError;
|
||||
|
@ -423,6 +428,94 @@ void DoCreateLabelMap(const ConfigParameters& config)
|
|||
fprintf(stderr, "%f seconds elapsed\n", (float)(std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count()) / 1000);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// for action SVD
|
||||
// An action "SVD" performs the following process to transform an existing model:
|
||||
// 1. For a Learnable Parameter A whose name matches with the user specified regex,
|
||||
// A is approximated by two matrice multiplication B*C ;
|
||||
// 2. In order to keep the low-rank structure in training,
|
||||
// the original A node will be replaced by A' whose opertions is Times
|
||||
// with its left children being B and right chilren being
|
||||
//
|
||||
// To use this command,
|
||||
// user need to specify:
|
||||
// 1) modelPath -- path to the existing model
|
||||
// 2) outputmodelPath -- where to write the transformed model
|
||||
// 3) KeepRatio -- how many percentage of energy we want to keep
|
||||
// 4) ParameterName -- name (regex) of the parameter node we want to perform a SVD decomposition
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// helper function for DoParameterSVD
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool ParseSVDConfigFile(wstring fn, map<wstring, float>& config)
|
||||
{
|
||||
msra::files::textreader reader(fn);
|
||||
for (; reader;)
|
||||
{
|
||||
wstring line = reader.wgetline();
|
||||
vector<wstring> tokens=msra::strfun::split(line, L"\t ");
|
||||
if (tokens.size() != 2)
|
||||
return false;
|
||||
config[tokens[0]] = (float)msra::strfun::todouble(tokens[1]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// a brief on the SVD config file usage
|
||||
void SVDConfigFileUsage()
|
||||
{
|
||||
fprintf(stderr, "usage of SVDConfigFile\n");
|
||||
fprintf(stderr, "A SVDConfigFile is referred in main config by \"SVDConfig\"\n");
|
||||
fprintf(stderr, "Each line in this file specifies a group of Learnable Parameter nodes using regex and the KeepRatio associated with that group\n");
|
||||
fprintf(stderr, "An example: \n");
|
||||
fprintf(stderr, "W0 1.0\n");
|
||||
fprintf(stderr, "W[1-5] 0.4\n");
|
||||
|
||||
|
||||
}
|
||||
template<typename ElemType>
|
||||
void DoParameterSVD(const ConfigParameters& config)
|
||||
{
|
||||
DEVICEID_TYPE deviceID = -1; // use CPU for SVD
|
||||
wstring modelPath = config("modelPath");
|
||||
wstring outputmodelPath = config("outputmodelPath");
|
||||
map<wstring, float> svdconfig;
|
||||
|
||||
float keepratio = config("KeepRatio", "0.4");
|
||||
wstring svdnodeRegex = config("NodeNameRegex", L"");
|
||||
if (!svdnodeRegex.empty())
|
||||
{
|
||||
svdconfig[svdnodeRegex] = keepratio;
|
||||
}
|
||||
else
|
||||
{
|
||||
// alternatively, user can also use a config to specify KeepRatios for different groups of nodes
|
||||
wstring svdnodeConfigFile = config("SVDConfig", L"");
|
||||
if (!ParseSVDConfigFile(svdnodeConfigFile, svdconfig))
|
||||
{
|
||||
SVDConfigFileUsage();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (modelPath.empty())
|
||||
{
|
||||
fprintf(stderr, "ERROR: in DoParameterSVD, modelPath is empty!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ComputationNetwork<ElemType> net(deviceID);
|
||||
net.LoadFromFile(modelPath);
|
||||
|
||||
net.PerformSVDecomposition(svdconfig);
|
||||
if (!outputmodelPath.empty())
|
||||
net.SaveToFile(outputmodelPath);
|
||||
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// for action writeWordAndClassInfo
|
||||
///
|
||||
|
@ -810,7 +903,9 @@ void DoCommand(const ConfigParameters& config)
|
|||
else if (action[j] == "writeWordAndClass")
|
||||
DoWriteWordAndClassInfo<ElemType>(commandParams);
|
||||
else if (action[j] == "plot")
|
||||
DoTopologyPlot<ElemType>(commandParams);
|
||||
DoTopologyPlot<ElemType>(commandParams);
|
||||
else if (action[j] == "SVD")
|
||||
DoParameterSVD<ElemType>(commandParams);
|
||||
else
|
||||
RuntimeError("unknown action: %s in command set: %s", action[j].c_str(), command[i].c_str());
|
||||
|
||||
|
@ -890,6 +985,7 @@ void PrintBuiltInfo()
|
|||
fprintf(stderr, "\t\tLast modified date: %s\n", __TIMESTAMP__);
|
||||
fprintf(stderr, "\t\tBuilt by %s on %s\n", _BUILDER_, _BUILDMACHINE_);
|
||||
fprintf(stderr, "\t\tBuild Path: %s\n", _BUILDPATH_);
|
||||
fprintf(stderr, "\t\tCUDA_PATH: %s\n", _CUDA_PATH_);
|
||||
#ifdef _GIT_EXIST
|
||||
fprintf(stderr, "\t\tBuild Branch: %s\n", _BUILDBRANCH_);
|
||||
fprintf(stderr, "\t\tBuild SHA1: %s\n", _BUILDSHA1_);
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -29,28 +21,16 @@
|
|||
<SccProvider>
|
||||
</SccProvider>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>cn</RootNamespace>
|
||||
<RootNamespace>CNTK</RootNamespace>
|
||||
<ProjectName>CNTK</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
|
@ -60,52 +40,28 @@
|
|||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>c:\Program Files\Microsoft MPI\Inc;..\..\Math\Math;..\..\Common\;..\..\Common\include;..\..\Common\PTask\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(CUDA_PATH)\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>c:\Program Files\Microsoft MPI\Lib\amd64;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)..\Common\lib;$(SolutionDir)..\Common\PTask\lib\$(Configuration)\;$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);$(CUDA_PATH)\lib\$(Platform)</LibraryPath>
|
||||
<IncludePath>c:\Program Files\Microsoft MPI\Inc;..\..\Math\Math;..\..\Common\;..\..\Common\include;$(VCInstallDir)include;$(CUDA_PATH)\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>c:\Program Files\Microsoft MPI\Lib\amd64;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)..\Common\lib;$(VCInstallDir)lib\amd64;$(WindowsSDK_LibraryPath_x64);$(CUDA_PATH)\lib\$(Platform)</LibraryPath>
|
||||
<CustomBuildAfterTargets>Build</CustomBuildAfterTargets>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>c:\Program Files\Microsoft MPI\Inc;..\..\Math\Math;..\..\Common\;..\..\Common\include;..\..\Common\PTask\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(CUDA_PATH)\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>c:\Program Files\Microsoft MPI\Lib\amd64;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)..\Common\lib;$(SolutionDir)..\Common\PTask\lib\$(Configuration)\;$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64);$(CUDA_PATH)\lib\$(Platform)</LibraryPath>
|
||||
<IncludePath>c:\Program Files\Microsoft MPI\Inc;..\..\Math\Math;..\..\Common\;..\..\Common\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(CUDA_PATH)\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>c:\Program Files\Microsoft MPI\Lib\amd64;$(SolutionDir)$(Platform)\$(Configuration);$(SolutionDir)..\Common\lib;$(VCInstallDir)lib\amd64;$(WindowsSDK_LibraryPath_x64);$(CUDA_PATH)\lib\$(Platform)</LibraryPath>
|
||||
<CustomBuildAfterTargets>Build</CustomBuildAfterTargets>
|
||||
<ExecutablePath>$(SolutionDir)..\Common\PTask\bin\;$(ExecutablePath)</ExecutablePath>
|
||||
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
|
@ -117,19 +73,18 @@
|
|||
<OpenMPSupport>true</OpenMPSupport>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalIncludeDirectories>"c:\Program Files\NVIDIA Corporation\GDK\gdk_win7_amd64_release\nvml\include"</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Delayimp.lib;nvml.lib;cntkMath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>CNTKMath.dll;nvml.dll;nvcuda.dll</DelayLoadDLLs>
|
||||
<AdditionalDependencies>CNTKMath.lib; nvml.lib; kernel32.lib; user32.lib; shell32.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>"c:\Program Files\NVIDIA Corporation\GDK\gdk_win7_amd64_release\nvml\lib"</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>CNTKMath.dll; nvml.dll; cudart64_70.dll</DelayLoadDLLs>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
<Message>
|
||||
</Message>
|
||||
<Command>xcopy /I /D /Y "%ProgramW6432%\NVIDIA Corporation\NVSMI\nvml*.dll" $(TargetDir)</Command>
|
||||
<Message>Copying NVidia GDK extension DLL to target folder</Message>
|
||||
</PostBuildEvent>
|
||||
<CustomBuildStep>
|
||||
</CustomBuildStep>
|
||||
|
@ -144,25 +99,6 @@
|
|||
<Command>prebuild.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<Profile>true</Profile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -176,19 +112,21 @@
|
|||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<AdditionalIncludeDirectories>"c:\Program Files\NVIDIA Corporation\GDK\gdk_win7_amd64_release\nvml\include"</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>Delayimp.lib;nvml.lib;cntkMath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>CNTKMath.lib; nvml.lib; kernel32.lib; user32.lib; shell32.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<Profile>true</Profile>
|
||||
<DelayLoadDLLs>CNTKMath.dll;nvml.dll;nvcuda.dll</DelayLoadDLLs>
|
||||
<DelayLoadDLLs>CNTKMath.dll; nvml.dll; cudart64_70.dll</DelayLoadDLLs>
|
||||
<AdditionalLibraryDirectories>"c:\Program Files\NVIDIA Corporation\GDK\gdk_win7_amd64_release\nvml\lib"</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(SolutionDir)..\Common\PTask\bin\*.dll $(TargetDir)</Command>
|
||||
<Message>Copy over the NVidia tools extention DLL</Message>
|
||||
<Command>xcopy /I /D /Y "%ProgramW6432%\NVIDIA Corporation\NVSMI\nvml*.dll" $(TargetDir)</Command>
|
||||
<Message>Copying NVidia GDK extension DLL to target folder</Message>
|
||||
</PostBuildEvent>
|
||||
<CustomBuildStep>
|
||||
<Command>
|
||||
|
@ -213,8 +151,8 @@
|
|||
<Text Include="modelEditorFromScratch.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\Common\hostname.h" />
|
||||
<ClInclude Include="..\..\Common\Include\basetypes.h" />
|
||||
<ClInclude Include="..\..\Common\Include\Basics.h" />
|
||||
<ClInclude Include="..\..\Common\Include\BestGpu.h" />
|
||||
<ClInclude Include="..\..\Common\Include\commandArgUtil.h" />
|
||||
<ClInclude Include="..\..\Common\Include\DataReader.h" />
|
||||
|
@ -222,19 +160,25 @@
|
|||
<ClInclude Include="..\..\Common\Include\File.h" />
|
||||
<ClInclude Include="..\..\Common\Include\fileutil.h" />
|
||||
<ClInclude Include="..\..\Common\Include\hostname.h" />
|
||||
<ClInclude Include="..\..\Common\Include\minibatchsourcehelpers.h" />
|
||||
<ClInclude Include="..\..\Common\Include\nvml.h" />
|
||||
<ClInclude Include="..\..\Common\Include\TimerUtility.h" />
|
||||
<ClInclude Include="CompositeComputationNode.h" />
|
||||
<ClInclude Include="CompositeComputationNodes.h" />
|
||||
<ClInclude Include="ComputationNetwork.h" />
|
||||
<ClInclude Include="ComputationNetworkHelper.h" />
|
||||
<ClInclude Include="ComputationNode.h" />
|
||||
<ClInclude Include="EvaluationCriterionNode.h" />
|
||||
<ClInclude Include="ConvolutionalNodes.h" />
|
||||
<ClInclude Include="EvaluationCriterionNodes.h" />
|
||||
<ClInclude Include="IComputationNetBuilder.h" />
|
||||
<ClInclude Include="IExecutionEngine.h" />
|
||||
<ClInclude Include="InputAndParamNodes.h" />
|
||||
<ClInclude Include="LinearAlgebraNodes.h" />
|
||||
<ClInclude Include="ModelEditLanguage.h" />
|
||||
<ClInclude Include="NDLNetworkBuilder.h" />
|
||||
<ClInclude Include="NDLUtil.h" />
|
||||
<ClInclude Include="NetworkDescriptionLanguage.h" />
|
||||
<ClInclude Include="NonlinearityNodes.h" />
|
||||
<ClInclude Include="RecurrentNodes.h" />
|
||||
<ClInclude Include="SimpleEvaluator.h" />
|
||||
<ClInclude Include="SimpleOutputWriter.h" />
|
||||
<ClInclude Include="SGD.h" />
|
||||
|
@ -242,7 +186,7 @@
|
|||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="SynchronousExecutionEngine.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="TrainingCriterionNode.h" />
|
||||
<ClInclude Include="TrainingCriterionNodes.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\Common\BestGpu.cpp" />
|
||||
|
@ -256,7 +200,7 @@
|
|||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\Common\TimerUtility.cpp" />
|
||||
<ClCompile Include="cn.cpp" />
|
||||
<ClCompile Include="CNTK.cpp" />
|
||||
<ClCompile Include="ComputationNode.cpp" />
|
||||
<ClCompile Include="ModelEditLanguage.cpp" />
|
||||
<ClCompile Include="NetworkDescriptionLanguage.cpp" />
|
||||
|
@ -264,6 +208,9 @@
|
|||
<ClCompile Include="stdafx.cpp" />
|
||||
<ClCompile Include="tests.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="prebuild.bat" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
|
@ -1,9 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\Common\BestGpu.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\Common\ConfigFile.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
|
@ -28,14 +25,11 @@
|
|||
<ClCompile Include="SimpleNetworkBuilder.cpp">
|
||||
<Filter>Network</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cn.cpp">
|
||||
<Filter>Main</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Main</Filter>
|
||||
<Filter>Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tests.cpp">
|
||||
<Filter>Main</Filter>
|
||||
<Filter>Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NetworkDescriptionLanguage.cpp">
|
||||
<Filter>Network</Filter>
|
||||
|
@ -43,17 +37,15 @@
|
|||
<ClCompile Include="..\..\Common\TimerUtility.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CNTK.cpp" />
|
||||
<ClCompile Include="..\..\Common\BestGpu.cpp">
|
||||
<Filter>GPU Interfacing</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\Common\Include\basetypes.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\BestGpu.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\hostname.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\commandArgUtil.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -63,9 +55,6 @@
|
|||
<ClInclude Include="..\..\Common\Include\File.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\nvml.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\DataReader.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
|
@ -87,15 +76,9 @@
|
|||
<ClInclude Include="ModelEditLanguage.h">
|
||||
<Filter>Model Editing</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CompositeComputationNode.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ComputationNode.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="EvaluationCriterionNode.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="NDLNetworkBuilder.h">
|
||||
<Filter>Network</Filter>
|
||||
</ClInclude>
|
||||
|
@ -120,14 +103,11 @@
|
|||
<ClInclude Include="SynchronousExecutionEngine.h">
|
||||
<Filter>Execution Engine</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TrainingCriterionNode.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Main</Filter>
|
||||
<Filter>Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Main</Filter>
|
||||
<Filter>Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\hostname.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
|
@ -135,6 +115,42 @@
|
|||
<ClInclude Include="..\..\Common\Include\TimerUtility.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\Basics.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\nvml.h">
|
||||
<Filter>GPU Interfacing</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\minibatchsourcehelpers.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Common\Include\BestGpu.h">
|
||||
<Filter>Common\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CompositeComputationNodes.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="EvaluationCriterionNodes.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TrainingCriterionNodes.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="NonlinearityNodes.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LinearAlgebraNodes.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ConvolutionalNodes.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="RecurrentNodes.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InputAndParamNodes.h">
|
||||
<Filter>Nodes</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="modelEditor.txt">
|
||||
|
@ -144,7 +160,7 @@
|
|||
<Filter>Model Editing</Filter>
|
||||
</Text>
|
||||
<Text Include="DefaultMacros.txt">
|
||||
<Filter>Main</Filter>
|
||||
<Filter>Misc</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -166,8 +182,16 @@
|
|||
<Filter Include="Nodes">
|
||||
<UniqueIdentifier>{0b366814-48b2-4619-bf92-85ee24e3cbc1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Main">
|
||||
<Filter Include="Misc">
|
||||
<UniqueIdentifier>{3c119a92-ffb2-4850-adae-01778324974d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="GPU Interfacing">
|
||||
<UniqueIdentifier>{8d99b2cc-5209-40e4-8b4b-a7616973ae3b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="prebuild.bat">
|
||||
<Filter>Misc</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|