From 8edb94be2a4c6250ef4bb26e58ca5fb0b9fee6ff Mon Sep 17 00:00:00 2001 From: Chiyuan Zhang Date: Mon, 14 Dec 2015 18:24:56 -0500 Subject: [PATCH] prepare for v0.0.7 --- NEWS.md | 7 +- docs/api/io.rst | 4 +- docs/api/ndarray.rst | 110 ++++++++++++++ docs/api/optimizer.rst | 9 ++ docs/api/symbolic-node.rst | 303 ++++++++++++++++++++++++++++++++++++- docs/conf.py | 4 +- 6 files changed, 427 insertions(+), 10 deletions(-) diff --git a/NEWS.md b/NEWS.md index dd95dbb5f..c0d365a73 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,9 @@ -$ v0.0.6 (2015.12.02) +# v0.0.7 (2015.12.14) + +* Fix compatability with Julia v0.4.2 (@BigEpsilon) +* Metrics in epoch callbacks (@kasiabozek) + +# v0.0.6 (2015.12.02) * Variants of Xaiver initializers (@vchuravy) * More arithmetic operators on symbolic nodes diff --git a/docs/api/io.rst b/docs/api/io.rst index 6186db52e..f1ab959be 100644 --- a/docs/api/io.rst +++ b/docs/api/io.rst @@ -324,7 +324,7 @@ libmxnet data providers :param prefetch_buffer: Backend Param: Number of prefetched parameters - :type prefetch_buffer: long (non-negative), optional, default=4 + :type prefetch_buffer: , optional, default=4 :param rand_crop: Augmentation Param: Whether to random crop on the image @@ -467,7 +467,7 @@ libmxnet data providers :param prefetch_buffer: Backend Param: Number of prefetched parameters - :type prefetch_buffer: long (non-negative), optional, default=4 + :type prefetch_buffer: , optional, default=4 :return: the constructed :class:`MXDataProvider`. diff --git a/docs/api/ndarray.rst b/docs/api/ndarray.rst index c5baf5b75..d2f0c4fc9 100644 --- a/docs/api/ndarray.rst +++ b/docs/api/ndarray.rst @@ -444,6 +444,17 @@ Public APIs +.. function:: ceil(...) + + Take ceil value of the src + + :param src: Source input to the function + :type src: NDArray + + + + + .. function:: choose_element_0index(...) Choose one element from each line(row for python, column for R/Julia) in lhs according to index indicated by rhs. This function assume rhs uses 0-based index. @@ -478,6 +489,17 @@ Public APIs +.. function:: cos(...) + + Take cos of the src + + :param src: Source input to the function + :type src: NDArray + + + + + .. function:: dot(...) Calcuate 2D matrix multiplication @@ -504,6 +526,17 @@ Public APIs +.. function:: floor(...) + + Take floor value of the src + + :param src: Source input to the function + :type src: NDArray + + + + + .. function:: log(...) Take log of the src @@ -515,6 +548,28 @@ Public APIs +.. function:: max(...) + + Take max of the src.The result will be ndarray of shape (1,) on the same device. + + :param src: Source input to the function + :type src: NDArray + + + + + +.. function:: min(...) + + Take min of the src.The result will be ndarray of shape (1,) on the same device. + + :param src: Source input to the function + :type src: NDArray + + + + + .. function:: norm(...) Take L2 norm of the src.The result will be ndarray of shape (1,) on the same device. @@ -526,6 +581,50 @@ Public APIs +.. function:: round(...) + + Take round value of the src + + :param src: Source input to the function + :type src: NDArray + + + + + +.. function:: rsqrt(...) + + Take rsqrt of the src + + :param src: Source input to the function + :type src: NDArray + + + + + +.. function:: sign(...) + + Take sign value of the src + + :param src: Source input to the function + :type src: NDArray + + + + + +.. function:: sin(...) + + Take sin of the src + + :param src: Source input to the function + :type src: NDArray + + + + + .. function:: sqrt(...) Take sqrt of the src @@ -547,6 +646,17 @@ Public APIs + +.. function:: sum(...) + + Take sum of the src.The result will be ndarray of shape (1,) on the same device. + + :param src: Source input to the function + :type src: NDArray + + + + Internal APIs ^^^^^^^^^^^^^ diff --git a/docs/api/optimizer.rst b/docs/api/optimizer.rst index 12e898d23..03c9c11fe 100644 --- a/docs/api/optimizer.rst +++ b/docs/api/optimizer.rst @@ -80,6 +80,15 @@ Common interfaces +.. class:: LearningRate.Inv + + :math:`\eta_t = \eta_0 * (1 + \gamma * t)^(-power)`. + Here :math:`t` is the epoch count, or the iteration count if ``decay_on_iteration`` + is set to true. + + + + .. function:: get_momentum(scheduler, state) :param AbstractMomentumScheduler scheduler: the momentum scheduler. diff --git a/docs/api/symbolic-node.rst b/docs/api/symbolic-node.rst index 3e030378c..3ddb299a8 100644 --- a/docs/api/symbolic-node.rst +++ b/docs/api/symbolic-node.rst @@ -187,7 +187,7 @@ Public APIs :param act_type: Activation function to be applied. - :type act_type: {'relu', 'sigmoid', 'tanh'}, required + :type act_type: {'relu', 'sigmoid', 'softrelu', 'tanh'}, required :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. @@ -207,12 +207,16 @@ Public APIs :param eps: Epsilon to prevent div 0 - :type eps: float, optional, default=1e-10 + :type eps: float, optional, default=0.001 :param momentum: Momentum for moving average :type momentum: float, optional, default=0.9 + + :param fix_gamma: Fix gamma while training + :type fix_gamma: boolean, optional, default=True + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. @@ -478,6 +482,34 @@ Public APIs +.. function:: IdentityAttachKLSparseReg(...) + + Apply a sparse regularization to the output a sigmoid activation function. + + :param data: Input data. + :type data: SymbolicNode + + + :param sparseness_target: The sparseness target + :type sparseness_target: float, optional, default=0.1 + + + :param penalty: The tradeoff parameter for the sparseness penalty + :type penalty: float, optional, default=0.001 + + + :param momentum: The momentum for running average + :type momentum: float, optional, default=0.9 + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + .. function:: LRN(...) Apply convolution to input then add a bias. @@ -519,10 +551,10 @@ Public APIs :param act_type: Activation function to be applied. - :type act_type: {'leaky', 'prelu', 'rrelu'},optional, default='leaky' + :type act_type: {'elu', 'leaky', 'prelu', 'rrelu'},optional, default='leaky' - :param slope: Init slope for the activation. (For leaky only) + :param slope: Init slope for the activation. (For leaky and elu only) :type slope: float, optional, default=0.25 @@ -553,6 +585,10 @@ Public APIs :param label: Input label to function. :type label: SymbolicNode + + :param grad_scale: Scale the gradient by a float factor + :type grad_scale: float, optional, default=1 + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. @@ -574,6 +610,34 @@ Public APIs :param label: Input label to function. :type label: SymbolicNode + + :param grad_scale: Scale the gradient by a float factor + :type grad_scale: float, optional, default=1 + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + +.. function:: MAERegressionOutput(...) + + Use mean absolute error regression for final output, this is used on final output of a net. + + :param data: Input data to function. + :type data: SymbolicNode + + + :param label: Input label to function. + :type label: SymbolicNode + + + :param grad_scale: Scale the gradient by a float factor + :type grad_scale: float, optional, default=1 + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. @@ -623,7 +687,7 @@ Public APIs :type data: SymbolicNode - :param target_shape: Target new shape + :param target_shape: Target new shape. One and only one dim can be 0, in which case it will be infered from the rest of dims :type target_shape: Shape(tuple), required :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. @@ -723,6 +787,36 @@ Public APIs +.. function:: UpSampling(...) + + Perform nearest neighboor/bilinear up sampling to inputs + + This function support variable length positional :class:`SymbolicNode` inputs. + + :param scale: Up sampling scale + :type scale: int (non-negative), required + + + :param num_filter: Input filter. Only used by nearest sample_type. + :type num_filter: int (non-negative), optional, default=0 + + + :param sample_type: upsampling method + :type sample_type: {'bilinear', 'nearest'}, required + + + :param num_args: Number of inputs to be upsampled. For nearest neighbor upsampling, this can be 1-N; the size of output will be(scale*h_0,scale*w_0) and all other inputs will be upsampled to thesame size. For bilinear upsampling this must be 2; 1 input and 1 weight. + :type num_args: int, required + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + .. function:: abs(...) Take absolute value of the src @@ -739,6 +833,38 @@ Public APIs +.. function:: ceil(...) + + Take ceil value of the src + + :param src: Source symbolic input to the function + :type src: SymbolicNode + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + +.. function:: cos(...) + + Take cos of the src + + :param src: Source symbolic input to the function + :type src: SymbolicNode + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + .. function:: exp(...) Take exp of the src @@ -755,6 +881,22 @@ Public APIs +.. function:: floor(...) + + Take floor value of the src + + :param src: Source symbolic input to the function + :type src: SymbolicNode + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + .. function:: log(...) Take log of the src @@ -771,6 +913,70 @@ Public APIs +.. function:: round(...) + + Take round value of the src + + :param src: Source symbolic input to the function + :type src: SymbolicNode + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + +.. function:: rsqrt(...) + + Take rsqrt of the src + + :param src: Source symbolic input to the function + :type src: SymbolicNode + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + +.. function:: sign(...) + + Take sign value of the src + + :param src: Source symbolic input to the function + :type src: SymbolicNode + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + +.. function:: sin(...) + + Take sin of the src + + :param src: Source symbolic input to the function + :type src: SymbolicNode + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + .. function:: sqrt(...) Take sqrt of the src @@ -809,6 +1015,19 @@ Internal APIs Document and signatures for internal API functions might be incomplete. +.. function:: _CrossDeviceCopy(...) + + Special op to copy data cross device + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + .. function:: _Div(...) Perform an elementwise div. @@ -846,6 +1065,80 @@ Internal APIs +.. function:: _Maximum(...) + + Perform an elementwise power. + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + +.. function:: _MaximumScalar(...) + + Perform an elementwise maximum. + + :param array: Input array operand to the operation. + :type array: SymbolicNode + + + :param scalar: scalar value. + :type scalar: float, required + + + :param scalar_on_left: scalar operand is on the left. + :type scalar_on_left: boolean, optional, default=False + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + +.. function:: _Minimum(...) + + Perform an elementwise power. + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + +.. function:: _MinimumScalar(...) + + Perform an elementwise minimum. + + :param array: Input array operand to the operation. + :type array: SymbolicNode + + + :param scalar: scalar value. + :type scalar: float, required + + + :param scalar_on_left: scalar operand is on the left. + :type scalar_on_left: boolean, optional, default=False + + :param Symbol name: The name of the :class:`SymbolicNode`. (e.g. `:my_symbol`), optional. + :param Dict{Symbol, AbstractString} attrs: The attributes associated with this :class:`SymbolicNode`. + + :return: the constructed :class:`SymbolicNode`. + + + + + .. function:: _Minus(...) Perform an elementwise minus. diff --git a/docs/conf.py b/docs/conf.py index 32e0d28f3..6293dcf80 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -56,9 +56,9 @@ # built documents. # # The short X.Y version. -version = '0.0.6' +version = '0.0.7' # The full version, including alpha/beta/rc tags. -release = '0.0.6' +release = '0.0.7' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.