Skip to content

Commit

Permalink
Add onnx into requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
YukioOobuchi committed Jun 7, 2018
1 parent 491332b commit 6aafe0a
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 6 deletions.
1 change: 1 addition & 0 deletions python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Cython>=0.24,<0.26
boto3
h5py
numpy>=1.10
onnx
protobuf
pyyaml
requests
Expand Down
1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'configparser',
'contextlib2',
'h5py',
'onnx',
'protobuf',
'requests',
'pyyaml',
Expand Down
2 changes: 2 additions & 0 deletions python/src/nnabla/utils/converter/function_order.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,5 @@ ACosh: 182
ATanh: 183
NmsDetection2d_ffB: 231
Pad_iIif: 123
Ceil_: 124
Floor_: 125
54 changes: 48 additions & 6 deletions python/src/nnabla/utils/converter/functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -700,14 +700,10 @@ Normalization:
.. math::
\begin{eqnarray}
\mu &=& \frac{1}{M} \sum x_i \\
rm &=& ({\rm decay\_rate}) rm + (1 - {\rm decay\_rate}) \mu \\
y_i &=& x_i - rm
y_i &=& x_i - \mu
\end{eqnarray}
At validation time, it is defined as
.. math::
y_i = x_i - rm
At testing time, the mean values used are those that were computed during training by moving average.
Note:
The backward performs an approximated differentiation that takes into account only the latest mini-batch.
Expand Down Expand Up @@ -1779,6 +1775,52 @@ Math:
.. math::
\frac{\partial y_i}{\partial x_i} = 1.
inputs:
x:
doc: Input variable
arguments: {}
outputs:
y:
doc: N-D array with the same shape as x
Ceil:
snake_name: ceil
doc: |2+
Element-wise ceil function.
In the forward pass, this function simply returns the smallest integer which is not less than the input.
.. math::
y_i = ceil(x_i).
In the backward pass, the simple Straight-Through Estimator (STE) is applied,
.. math::
\frac{\partial y_i}{\partial x_i} = 1.
inputs:
x:
doc: Input variable
arguments: {}
outputs:
y:
doc: N-D array with the same shape as x
Floor:
snake_name: floor
doc: |2+
Element-wise floor function.
In the forward pass, this function simply returns the largest integer which is not greater than the input.
.. math::
y_i = floor(x_i).
In the backward pass, the simple Straight-Through Estimator (STE) is applied,
.. math::
\frac{\partial y_i}{\partial x_i} = 1.
inputs:
x:
doc: Input variable
Expand Down
2 changes: 2 additions & 0 deletions src/nbla/function/global_average_pooling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ namespace nbla {
// float
template class GlobalAveragePooling<float>;


// half
template class GlobalAveragePooling<Half>;

}

0 comments on commit 6aafe0a

Please sign in to comment.