Neural Network Libraries
latest
  • Python パッケージ
  • C++ API
    • C++ ライブラリのビルド
    • C++ コマンドラインインターフェイス
    • C++ API 実装例
    • C++ API Document
      • NNABLA C++ API Document
        • NNABLA Class
        • NNABLA Struct
        • NNABLA Namespace
      • NNABLA Ext Cuda C++ API Document
  • データファイルフォーマット
  • データフォーマット
  • ファイルフォーマットコンバーター
  • サポート状況
  • コントリビューションガイド
  • License
Neural Network Libraries
  • C++ API
  • C++ API Document
  • NNABLA C++ API Document
  • NNABLA Class
  • class nbla::Unlink
  • Edit on GitHub

class nbla::Unlink

template<typename T>
class Unlink : public nbla::BaseFunction<>

Unlink Layer identical forward and zero backward.

Inputs:

  • N-D array.

Outputs:

  • N-D array.

テンプレートパラメータ:

T -- Data type for computation.

Public Functions

inline virtual shared_ptr<Function> copy() const

Copy another instance of Function with the same context.

inline virtual vector<dtypes> in_types()

Get input dtypes.

Last in_type will be used repeatedly if size of in_types is smaller than size of inputs

inline virtual vector<dtypes> out_types()

Get output dtypes.

Last out_type will be used repeatedly if size of out_types is smaller than size of outputs

inline virtual int min_inputs()

Get minimum number of inputs.

This is meant to be used in setup function with in_types which is used to get maximum number of inputs.

inline virtual int min_outputs()

Get minimum number of outputs.

This is meant to be used in setup function with out_types which is used to get max number of outputs.

inline virtual string name()

Get function name in string.

inline virtual vector<string> allowed_array_classes()

Get array classes that are allowed to be specified by Context.

inline virtual int inplace_data(int i) const

Get in-place-level of i-th input variable's data (see below).

0 (NOT_INPLACE): Not in-placed 1 (INPLACE_NOT_MODIFY): In-placed but not modified. 2 (INPLACE): In-placed and modified.

注釈

If a subclass uses in-place computation, the function must override this function.

パラメータ:

i -- [in] Input variable index.

戻り値:

Returns -- 0 by default.

inline virtual int inplace_data_with(int i) const

Get the output variable index where i-th variables' data in-placed to.

注釈

This is only valid if the i-th variable is in-placed. The maintainer of a sub-class function must override this function.

パラメータ:

i -- [in] Input variable index.

inline virtual bool grad_depends_output_data(int i, int o) const

Dependency flag for checking if in-grad depends on out-data.

Checking if i-th input' gradient computation requires o-th output's data or not.

注釈

If any of inputs requires an output variable data when computing its gradient, this function must be overridden to return appropriate boolean value. Otherwise, backward computation will be incorrect.

パラメータ:
  • i -- [in] Input variable index.

  • o -- [in] Output variable index.

前へ 次へ

© Copyright 2017, Sony Corporation. Revision cbf0545b.

Built with Sphinx using a theme provided by Read the Docs.