Граф коммитов

208 Коммитов

Автор SHA1 Сообщение Дата
Yang Chen 3d809bf54c Added several internal API header files
In case other projects may use these header files, we added
them into API/Internals.

* ComputationGraphAlgorithms.h was moved from Source/ComputationNetworkLib

* PrimitiveOpType.h and EvaluatorWrapper.h were moved from Source/CNTKv2Library

* PrimitiveFunctionAttribute.h was extracted from PrimitiveFunction.h. It contains
  a new class PrimitiveFunctionAttribute which is the collection of all attribute
  names for PrimitiveFunction.

  This change actually had a subtle side-effect. We had a global static variable
  s_stateAttributes that depended on PrimitiveFunction::AttributeNameRngSeed and
  PrimitiveFunction::AttributeNameRngOffset. After we moved those static
  attribute-variables into another translation unit, s_stateAttributes can be
  initialized with empty wstring, because PrimitiveFunctionAttribute::AttributeNameRngSeed
  PrimitiveFunctionAttribute::AttributeNameRngSeedOffset were initialized after
  s_stateAttributes. Note that the initialization order of global static variables
  is not well-defined cross translation units. To fix the issue, we also moved
  s_stateAttributes into PrimitiveFunctionAttribute class, and renamed it to
  s_rngStateAttributes. I think it's reasonable to consider s_rngStateAttributes
  to be part of the PrimitiveFunctionAttribute class.

* PrimitiveFunction.h was moved from Source/CNTKv2Library
2018-08-22 10:47:18 -07:00
liqfu ae163b33a8 ONNX support for CNTK Sequence::Slice op. Due to a specific feature of CNTK Sequence::Slice op to handle zigged inputs (batch of variable length sequences), models converted from CNTK may not produce marching outcomes with zigged inputs. 2018-08-14 11:17:36 -07:00
Bowen Bao 5ca4bb3a93 Add Sequential Convolution.
adding convolution over sequential axis related tests.

adding convolution over sequential axis.
currently additional supported parameters:
  auto padding
  strides
  groups
support for dilation needs to be tested on GPU.

updating PrimitiveOpType SerializationTests that is missing from other commits ..

convert tabs to spaces.

Refine cpp convolution unit tests. Add dilation tests to python convolution unit tests.

more detailed comments on shape change for 1d seq conv with reduction rank 0. And other minor tweaks.

add EndToEndTests of sequential convolution on MNIST

add init_bias tests for seq conv

minor change in comments

rename ConvolutionOverSequenceAxisNode. Add comment on cudnn failed new test.

add more comments, trim spaces

add more comments, remove magic number, add more boundary checks.

remove the last SetValue for outputSeqAxisDimValue as TensorView Unary Op has already updated the value.

fix bug in python seqconv default bias shape, and add related unit tests.

small tweak in seq conv to avoid additional gpu memory allocation and increase performance.

Example: seq MNIST, and profiling

adjust conv c++ value unit test channel size.

small update on python seq mnist

Sequential convolution v2.
* re-designed ConvolutionSequenceShapeNode: refactored to separate out computing output sequence length from v1 node design. And refactored ConvolutionNodeBaseExtended as their common base class. (Since "ConvolutionNodeBase" is not only base class of ConvolutionNode but also PoolingNode).
* Performance increase against v1.
- compute sequence length by MBLayout instead of mask output from unpack. Avoiding the unnecessary cpu/gpu memory copy.

not include py sequence example for now .. need to find they a correct location.

add check for truncated sequences in sequential convolution

improve code style.

Moving sequential convolution in python to a new high level api, to maintain compatibility with previous implementation (special case 1d sequential convolution).

Add ConvolutionSequenceShape OP.

nit

update conv_attribute test for updated convolution parameter
move sequential parameter to the last
update test shortcircuit for CPU convolution dilation.

update endtoendtest - unittest baseline file for new convolution unittests.

update makefile to include new unittest file for linux

nit

Update ConvolutionNode initialization code to handle TransformerNode Initialization.

nit

nit
2018-07-10 21:10:33 -07:00
Sergii Dymchenko e95f92cd5e Add Tan/Atan ops to CNTK (with ONNX support). 2018-06-28 14:03:02 -07:00
Jie Zhu 02be8a0d69 adding straight through unary op 2018-06-27 11:44:49 -07:00
Jaliya Ekanayake 6bd9d286ea Fix the missing dynamic axis for CustomProxyOp 2018-05-24 15:15:13 -07:00
Jaliya Ekanayake 796b59dad1 Adding a special op to proxy operands to optimized implemenations such as Halide 2018-05-21 12:39:44 -07:00
Yuqing Tang 5a587b376d Implemented eye_like Op and the depedent SetDiagonalValue methods for CPU and GPU sparse matrices. 2018-05-05 21:24:59 -07:00
Spandan Tiwari 09e25a47fa Moving group convolution implementation to use cuDNN7 and MKL2017 APIs. 2018-04-11 10:26:15 -07:00
KeDengMS d7704195da Fix shape inference in step function for scalar to broadcast 2018-03-01 14:47:46 -08:00
KeDengMS 3cf3af5df6 CNTK support for CUDA 9
CNTK now supports CUDA 9/cuDNN 7. This requires an update to build environment to Ubuntu 16/GCC 5 for Linux, and Visual Studio 2017/VCTools 14.11 for Windows. With CUDA 9, CNTK also added a preview for 16-bit floating point (a.k.a FP16) computation.

Please check out the example of FP16 in ResNet50 at /Examples/Image/Classification/ResNet/Python/TrainResNet_ImageNet_Distributed.py

Notes on FP16 preview:
* FP16 implementation on CPU is not optimized, and it's not supposed to be used in CPU inference directly. User needs to convert the model to 32-bit floating point before running on CPU.
* Loss/Criterion for FP16 training needs to be 32bit for accumulation without overflow, using cast function. Please check the example above.
* Readers do not have FP16 output unless using numpy to feed data, cast from FP32 to FP16 is needed. Please check the example above.
* FP16 gradient aggregation is currently only implemented on GPU using NCCL2. Distributed training with FP16 with MPI is not supported.
* FP16 math is a subset of current FP32 implementation. Some model may get Feature Not Implemented exception using FP16.
* FP16 is currently not supported in BrainScript. Please use Python for FP16.

To setup build and runtime environment on Windows:
* Install [Visual Studio 2017](https://www.visualstudio.com/downloads/) with following workloads and components. From command line (use Community version installer as example):
    vs_community.exe --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.Component.PythonTools --add Microsoft.VisualStudio.Component.VC.Tools.14.11
* Install [NVidia CUDA 9](https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64)
* From PowerShell, run:
    /Tools/devInstall/Windows/DevInstall.ps1
* Start VCTools 14.11 command line, run:
    cmd /k "%VS2017INSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" x64 --vcvars_ver=14.11
* Open /CNTK.sln from the VCTools 14.11 command line. Note that starting CNTK.sln other than VCTools 14.11 command line, would causes CUDA 9 [build error](https://developercommunity.visualstudio.com/content/problem/163758/vs-2017-155-doesnt-support-cuda-9.html).

To setup build and runtime environment on Linux using docker, please build Unbuntu 16.04 docker image using Dockerfiles /Tools/docker. For other Linux systems, please refer to the Dockerfiles to setup dependent libraries for CNTK.
2018-01-22 16:58:56 -08:00
Vadim Mazalov e57bac1cb0 Further lattice reader cleanup 2018-01-12 11:03:22 -08:00
Vadim Mazalov 1b2a256471 Add SequenceWithLatticeNode 2018-01-12 10:57:23 -08:00
Nikos Karampatziakis c7d2502662 squeeze, expand_dims, zeros_like, ones_like
closes #2306
2017-12-13 09:58:51 -08:00
Nikos Karampatziakis 5c97bd02ab add top k operation. Closes #2468. 2017-12-06 18:19:02 -08:00
Eldar Akchurin 0518eb4c08 Fixing merging issues 2017-10-24 17:01:46 +02:00
Eldar Akchurin de96983d5d Refactoring for inference work + adding Flatten method on function to be able to clone without blocks. 2017-10-24 09:31:23 +02:00
Emad Barsoum 68832a9c89 Merge branch 'asinh' of https://github.com/lakshayg/CNTK into lakshayg-asinh
PR for Sinh...
2017-10-20 09:19:51 -07:00
Project Philly 57e3a74de9 Integrate sptiwari/pooling_freedim_bugfix into master 2017-10-19 05:25:32 +00:00
KeDengMS a96d4985b9 Add custom attributes to primitive function 2017-10-17 21:31:10 -07:00
Spandan Tiwari 6b17cb6c93 Fixed free static axes size bug in max pooling, average pooling, and max unpooling. 2017-10-17 18:17:38 -07:00
Lakshay Garg b310ac3ee7 implement asinh operation 2017-10-13 12:23:16 +05:30
Emad Barsoum 02b3640ac9 Merge branch 'atanh' of https://github.com/lakshayg/CNTK into lakshayg-atanh
Atanh PR...
2017-10-12 16:40:18 -07:00
Emad Barsoum d57ad1d673 Adding ONNX format support to CNTK. 2017-10-10 01:01:43 -07:00
Lakshay Garg 98a6b42456 implement atanh operation 2017-09-15 16:17:44 +05:30
Cheng Tang f07a05dd2b remove check for free dimension on pooling
add ut

add test with strides input
2017-09-11 11:00:02 -07:00
Spandan Tiwari 765707a979 Make convolution work with free static axes coming from sequence unpack. 2017-09-06 16:48:41 -07:00
Nikola Milosavljevic 22762e3b8c Expose crop layer in Python API 2017-09-04 09:19:12 +02:00
Deyu Fu 4af094d792 Add GPU dilation convolution in C++, Python and Brainscript. 2017-08-29 18:41:32 -07:00
Spandan Tiwari 1633039542 Adding support for free static axes for convolution node. 2017-08-24 16:09:04 -07:00
Cheng Tang c598f9ecea fix comments in CR 2017-08-10 14:04:17 -07:00
Cheng Tang b8252dbf13 add padding op 2017-08-10 14:00:15 -07:00
Spandan Tiwari ad9c6cbd0a Implement acos and asin nodes. Thanks to contribution by Lakshay Garg (GitHub PR # 2162) 2017-07-31 15:39:56 -07:00
yuqtang 2e42bf45b3 Implemented reduction over multiple axes. 2017-07-24 11:25:43 -07:00
Cheng Tang a433349959 fix merge conflict 2017-07-23 17:00:16 -07:00
Cheng Tang d86f020081 fix comments in cr;add inferred dimension test 2017-07-22 20:29:49 -07:00
Project Philly 1887421cae Integrate a71ba4a76c into master 2017-07-21 17:02:16 -07:00
Cheng Tang f4e9df1242 fix comments in cr 2017-07-21 16:41:35 -07:00
Cheng Tang 8d1bc2465b change to ComputationNodeNoneLoop;disable scalar for to_batch;fix other comments 2017-07-21 15:00:17 -07:00
Cheng Tang cf33531a8b fix merge issue 2017-07-21 13:41:10 -07:00
Cheng Tang abc14310f9 support free dimension with to_batch/unpack_batch; fix comments in CR 2017-07-19 20:54:43 -07:00
Cheng Tang 2a68daad28 fix comments in cr 2017-07-18 11:08:09 -07:00
Cheng Tang 3229c715a9 fix de-serialization issue 2017-07-18 11:08:08 -07:00
Cheng Tang 0312e96610 add reverse support in slice 2017-07-18 11:06:12 -07:00
Eldar Akchurin aa4d01ca71 Moving data deserializer to the experimental header and refactoring common types between v2 and old readers.
- Breaking change in C++ API:
        NDShape::Unknown has been changed to NDShape::Unknown()
    - Readers mostly moved to CNTK namespace
    - Some duplicate types between readers and V2 library are removed
    - Readers now depend (header only) from V2
2017-07-17 14:27:56 +02:00
Lakshay Garg 32ad73fac8 implement hyperbolic functions 2017-07-14 17:05:27 +05:30
Cheng Tang fb8a3fbbae add attach/detach dynamic axis ops 2017-07-11 11:21:31 -07:00
Emad Barsoum 08d3051ddc Change ROI pooling to match Caffe version. 2017-06-05 18:29:17 -07:00
Nikos Karampatziakis a66502dc53 incorporate CR feedback 2017-05-25 14:10:46 -07:00
Nikos Karampatziakis de03dbf224 Random ops 2017-05-23 18:20:13 -07:00