Dragon - C++ API
A Computation Graph Virtual Machine Based Deep Learning Framework
Namespaces | Macros | Functions
expand_dims_op.cc File Reference
#include "core/workspace.h"
#include "operators/array/dimension_op.h"

Namespaces

 dragon
 

Macros

#define DETERMINE_RUNTIME_ARGS(X)
 

Functions

 dragon::DEPLOY_CPU (ExpandDims)
 
 dragon::DEPLOY_CUDA (ExpandDims)
 
 dragon::DEPLOY_CPU (ExpandDimsGradient)
 
 dragon::DEPLOY_CUDA (ExpandDimsGradient)
 
 dragon::NumInputs (1) .NumOutputs(1) .Inplace(
 
 dragon::NumInputs (2) .NumOutputs(1) .Inplace(
 
 dragon::REGISTER_GRADIENT (ExpandDims, SimpleGradientMaker)
 

Macro Definition Documentation

◆ DETERMINE_RUNTIME_ARGS

#define DETERMINE_RUNTIME_ARGS (   X)
Value:
axis_ = OpArg<int64_t>("axis", 0); \
axis_ = axis_ < 0 ? axis_ + X.ndim() + 1 : axis_; \
CHECK(axis_ >= 0 && axis_ <= X.ndim()) \
<< "\nExcepted the axis in [-" << X.ndim() + 1 \
<< ", " << X.ndim() << "], got " \
<< OpArg<int64_t>("axis", 0) << ".";