8 #ifndef MXNET_CPP_OP_H_ 9 #define MXNET_CPP_OP_H_ 17 #include "dmlc/optional.h" 18 #include "nnvm/tuple.h" 64 const std::vector<Symbol>& args) {
67 .CreateSymbol(symbol_name);
82 bool init_output =
true) {
84 .
SetParam(
"init_output", init_output)
101 const std::vector<Symbol>& data,
103 bool init_output =
true) {
106 .
SetParam(
"init_output", init_output)
108 .CreateSymbol(symbol_name);
127 const std::vector<Symbol>& data,
128 const std::string& op_type) {
131 .CreateSymbol(symbol_name);
192 return Operator(
"broadcast_maximum")
225 return Operator(
"broadcast_minimum")
349 bool keep_highest =
false) {
353 .
SetParam(
"target_shape", target_shape)
354 .
SetParam(
"keep_highest", keep_highest)
572 dmlc::optional<int> end) {
735 dmlc::optional<int> axis = dmlc::optional<int>()) {
853 const std::vector<Symbol>& data,
860 .CreateSymbol(symbol_name);
886 const std::vector<Symbol>& data,
887 dmlc::optional<Shape> axis = dmlc::optional<Shape>()) {
891 .CreateSymbol(symbol_name);
1073 const std::vector<Symbol>& args) {
1076 .CreateSymbol(symbol_name);
1112 dmlc::optional<int> axis = dmlc::optional<int>(),
1113 bool keepdims =
false) {
1154 dmlc::optional<int> axis = dmlc::optional<int>(),
1155 bool keepdims =
false) {
1260 dmlc::optional<int> axis = dmlc::optional<int>(-1),
1261 bool keepdims =
false,
1263 static const char *PickModeValues[] = {
1270 .
SetParam(
"mode", PickModeValues[
int(mode)])
1348 bool transpose_a =
false,
1349 bool transpose_b =
false,
1351 static const char *DotForwardStypeValues[] = {
1358 .
SetParam(
"transpose_a", transpose_a)
1359 .
SetParam(
"transpose_b", transpose_b)
1360 .
SetParam(
"forward_stype", DotForwardStypeValues[
int(forward_stype)])
1405 bool transpose_a =
false,
1406 bool transpose_b =
false,
1408 static const char *Batch_dotForwardStypeValues[] = {
1415 .
SetParam(
"transpose_a", transpose_a)
1416 .
SetParam(
"transpose_b", transpose_b)
1417 .
SetParam(
"forward_stype", Batch_dotForwardStypeValues[
int(forward_stype)])
1841 dmlc::optional<int> lhs_begin = dmlc::optional<int>(),
1842 dmlc::optional<int> lhs_end = dmlc::optional<int>(),
1843 dmlc::optional<int> rhs_begin = dmlc::optional<int>(),
1844 dmlc::optional<int> rhs_end = dmlc::optional<int>()) {
1909 static const char *CastDtypeValues[] = {
1919 .
SetParam(
"dtype", CastDtypeValues[
int(dtype)])
2599 static const char *Amp_castDtypeValues[] = {
2609 .
SetParam(
"dtype", Amp_castDtypeValues[
int(dtype)])
2628 const std::vector<Symbol>& data,
2631 .
SetParam(
"num_outputs", num_outputs)
2633 .CreateSymbol(symbol_name);
2703 dmlc::optional<int> axis = dmlc::optional<int>(-1),
2706 bool is_ascend =
false,
2708 static const char *TopkRetTypValues[] = {
2714 static const char *TopkDtypeValues[] = {
2724 .
SetParam(
"ret_typ", TopkRetTypValues[
int(ret_typ)])
2726 .
SetParam(
"dtype", TopkDtypeValues[
int(dtype)])
2765 dmlc::optional<int> axis = dmlc::optional<int>(-1),
2766 bool is_ascend =
true) {
2819 dmlc::optional<int> axis = dmlc::optional<int>(-1),
2820 bool is_ascend =
true,
2822 static const char *ArgsortDtypeValues[] = {
2832 .
SetParam(
"dtype", ArgsortDtypeValues[
int(dtype)])
3021 bool sparse_grad =
false) {
3022 static const char *EmbeddingDtypeValues[] = {
3033 .
SetParam(
"output_dim", output_dim)
3034 .
SetParam(
"dtype", EmbeddingDtypeValues[
int(dtype)])
3035 .
SetParam(
"sparse_grad", sparse_grad)
3118 static const char *TakeModeValues[] = {
3125 .
SetParam(
"mode", TakeModeValues[
int(mode)])
3227 double on_value = 1,
3228 double off_value = 0,
3230 static const char *One_hotDtypeValues[] = {
3243 .
SetParam(
"dtype", One_hotDtypeValues[
int(dtype)])
3406 return Operator(
"broadcast_not_equal")
3437 return Operator(
"broadcast_greater")
3468 return Operator(
"broadcast_greater_equal")
3499 return Operator(
"broadcast_lesser")
3530 return Operator(
"broadcast_lesser_equal")
3561 return Operator(
"broadcast_logical_and")
3592 return Operator(
"broadcast_logical_or")
3623 return Operator(
"broadcast_logical_xor")
3843 static const char *Cast_storageStypeValues[] = {
3849 .
SetParam(
"stype", Cast_storageStypeValues[
int(stype)])
3914 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
3915 bool keepdims =
false,
3916 bool exclude =
false) {
3951 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
3952 bool keepdims =
false,
3953 bool exclude =
false) {
3988 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
3989 bool keepdims =
false,
3990 bool exclude =
false) {
4027 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
4028 bool keepdims =
false,
4029 bool exclude =
false) {
4066 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
4067 bool keepdims =
false,
4068 bool exclude =
false) {
4103 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
4104 bool keepdims =
false,
4105 bool exclude =
false) {
4140 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
4141 bool keepdims =
false,
4142 bool exclude =
false) {
4259 dmlc::optional<Shape> lhs_axes = dmlc::optional<Shape>(),
4260 dmlc::optional<Shape> rhs_axes = dmlc::optional<Shape>()) {
4328 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
4330 bool keepdims =
false) {
4331 static const char *NormOutDtypeValues[] = {
4343 .
SetParam(
"out_dtype", NormOutDtypeValues[
int(out_dtype)])
4809 bool global_pool =
false,
4810 bool cudnn_off =
false,
4814 dmlc::optional<int> p_value = dmlc::optional<int>(),
4815 dmlc::optional<bool> count_include_pad = dmlc::optional<bool>(),
4817 static const char *PoolingPoolTypeValues[] = {
4823 static const char *PoolingPoolingConventionValues[] = {
4828 static const char *PoolingLayoutValues[] = {
4839 .
SetParam(
"pool_type", PoolingPoolTypeValues[
int(pool_type)])
4840 .
SetParam(
"global_pool", global_pool)
4842 .
SetParam(
"pooling_convention", PoolingPoolingConventionValues[
int(pooling_convention)])
4846 .
SetParam(
"count_include_pad", count_include_pad)
4847 .
SetParam(
"layout", PoolingLayoutValues[
int(layout)])
4897 dmlc::optional<double> temperature = dmlc::optional<double>(),
4899 static const char *SoftmaxDtypeValues[] = {
4907 .
SetParam(
"temperature", temperature)
4908 .
SetParam(
"dtype", SoftmaxDtypeValues[
int(dtype)])
4959 dmlc::optional<double> temperature = dmlc::optional<double>(),
4961 static const char *SoftminDtypeValues[] = {
4969 .
SetParam(
"temperature", temperature)
4970 .
SetParam(
"dtype", SoftminDtypeValues[
int(dtype)])
5011 dmlc::optional<double> temperature = dmlc::optional<double>(),
5013 static const char *Log_softmaxDtypeValues[] = {
5021 .
SetParam(
"temperature", temperature)
5022 .
SetParam(
"dtype", Log_softmaxDtypeValues[
int(dtype)])
5081 uint32_t num_filter,
5087 uint32_t num_group = 1,
5088 uint64_t workspace = 512,
5089 bool no_bias =
true,
5091 bool cudnn_off =
false,
5093 static const char *DeconvolutionCudnnTuneValues[] = {
5096 "limited_workspace",
5099 static const char *DeconvolutionLayoutValues[] = {
5109 .
SetParam(
"num_filter", num_filter)
5114 .
SetParam(
"target_shape", target_shape)
5118 .
SetParam(
"cudnn_tune", DeconvolutionCudnnTuneValues[
int(cudnn_tune)])
5120 .
SetParam(
"layout", DeconvolutionLayoutValues[
int(layout)])
5159 static const char *ActivationActTypeValues[] = {
5167 .
SetParam(
"act_type", ActivationActTypeValues[
int(act_type)])
5246 double eps = 0.0010000000474974513,
5248 bool fix_gamma =
true,
5249 bool use_global_stats =
false,
5250 bool output_mean_var =
false,
5252 bool cudnn_off =
false) {
5257 .
SetParam(
"use_global_stats", use_global_stats)
5258 .
SetParam(
"output_mean_var", output_mean_var)
5264 .
SetInput(
"moving_mean", moving_mean)
5265 .
SetInput(
"moving_var", moving_var)
5351 bool use_data_lengths =
false,
5352 bool use_label_lengths =
false,
5354 static const char *CTCLossBlankLabelValues[] = {
5359 .
SetParam(
"use_data_lengths", use_data_lengths)
5360 .
SetParam(
"use_label_lengths", use_label_lengths)
5361 .
SetParam(
"blank_label", CTCLossBlankLabelValues[
int(blank_label)])
5364 .
SetInput(
"data_lengths", data_lengths)
5365 .
SetInput(
"label_lengths", label_lengths)
5417 bool no_bias =
false,
5418 bool flatten =
true) {
5420 .
SetParam(
"num_hidden", num_hidden)
5552 uint32_t num_filter,
5556 uint32_t num_group = 1,
5557 uint64_t workspace = 1024,
5558 bool no_bias =
false,
5560 bool cudnn_off =
false,
5562 static const char *ConvolutionCudnnTuneValues[] = {
5565 "limited_workspace",
5568 static const char *ConvolutionLayoutValues[] = {
5578 .
SetParam(
"num_filter", num_filter)
5585 .
SetParam(
"cudnn_tune", ConvolutionCudnnTuneValues[
int(cudnn_tune)])
5587 .
SetParam(
"layout", ConvolutionLayoutValues[
int(layout)])
5676 const std::vector<Symbol>& data,
5682 uint64_t workspace = 512) {
5683 static const char *UpSamplingSampleTypeValues[] = {
5687 static const char *UpSamplingMultiInputModeValues[] = {
5693 .
SetParam(
"sample_type", UpSamplingSampleTypeValues[
int(sample_type)])
5695 .
SetParam(
"num_filter", num_filter)
5696 .
SetParam(
"multi_input_mode", UpSamplingMultiInputModeValues[
int(multi_input_mode)])
5699 .CreateSymbol(symbol_name);
5749 const std::vector<Symbol>& data,
5756 .CreateSymbol(symbol_name);
5803 bool output_mean_var =
false) {
5807 .
SetParam(
"output_mean_var", output_mean_var)
5909 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>(0)) {
5910 static const char *DropoutModeValues[] = {
5916 .
SetParam(
"mode", DropoutModeValues[
int(mode)])
5967 static const char *SoftmaxActivationModeValues[] = {
5971 return Operator(
"SoftmaxActivation")
5972 .
SetParam(
"mode", SoftmaxActivationModeValues[
int(mode)])
6008 dmlc::optional<Shape> axes = dmlc::optional<Shape>(),
6009 bool keepdims =
false) {
6064 mx_float upper_bound = 0.333999991) {
6065 static const char *LeakyReLUActTypeValues[] = {
6074 .
SetParam(
"act_type", LeakyReLUActTypeValues[
int(act_type)])
6076 .
SetParam(
"lower_bound", lower_bound)
6077 .
SetParam(
"upper_bound", upper_bound)
6174 uint32_t state_size,
6175 uint32_t num_layers,
6177 bool bidirectional =
false,
6179 bool state_outputs =
false,
6180 dmlc::optional<int> projection_size = dmlc::optional<int>(),
6181 dmlc::optional<double> lstm_state_clip_min = dmlc::optional<double>(),
6182 dmlc::optional<double> lstm_state_clip_max = dmlc::optional<double>(),
6183 bool lstm_state_clip_nan =
false,
6184 bool use_sequence_length =
false) {
6185 static const char *RNNModeValues[] = {
6192 .
SetParam(
"state_size", state_size)
6193 .
SetParam(
"num_layers", num_layers)
6194 .
SetParam(
"mode", RNNModeValues[
int(mode)])
6195 .
SetParam(
"bidirectional", bidirectional)
6197 .
SetParam(
"state_outputs", state_outputs)
6198 .
SetParam(
"projection_size", projection_size)
6199 .
SetParam(
"lstm_state_clip_min", lstm_state_clip_min)
6200 .
SetParam(
"lstm_state_clip_max", lstm_state_clip_max)
6201 .
SetParam(
"lstm_state_clip_nan", lstm_state_clip_nan)
6202 .
SetParam(
"use_sequence_length", use_sequence_length)
6204 .
SetInput(
"parameters", parameters)
6206 .
SetInput(
"state_cell", state_cell)
6207 .
SetInput(
"sequence_length", sequence_length)
6319 bool multi_output =
false,
6320 bool use_ignore =
false,
6321 bool preserve_shape =
false,
6323 bool out_grad =
false,
6325 static const char *SoftmaxOutputNormalizationValues[] = {
6331 .
SetParam(
"grad_scale", grad_scale)
6332 .
SetParam(
"ignore_label", ignore_label)
6333 .
SetParam(
"multi_output", multi_output)
6334 .
SetParam(
"use_ignore", use_ignore)
6335 .
SetParam(
"preserve_shape", preserve_shape)
6336 .
SetParam(
"normalization", SoftmaxOutputNormalizationValues[
int(normalization)])
6338 .
SetParam(
"smooth_alpha", smooth_alpha)
6375 uint32_t dim2 = 0) {
6449 bool fix_gamma =
true,
6450 bool use_global_stats =
false,
6451 bool output_mean_var =
false) {
6456 .
SetParam(
"use_global_stats", use_global_stats)
6457 .
SetParam(
"output_mean_var", output_mean_var)
6504 return Operator(
"softmax_cross_entropy")
6543 return Operator(
"LinearRegressionOutput")
6544 .
SetParam(
"grad_scale", grad_scale)
6584 return Operator(
"MAERegressionOutput")
6585 .
SetParam(
"grad_scale", grad_scale)
6631 return Operator(
"LogisticRegressionOutput")
6632 .
SetParam(
"grad_scale", grad_scale)
6649 mx_float sparseness_target = 0.100000001,
6652 return Operator(
"IdentityAttachKLSparseReg")
6653 .
SetParam(
"sparseness_target", sparseness_target)
6698 .
SetParam(
"rescale_grad", rescale_grad)
6699 .
SetParam(
"clip_gradient", clip_gradient)
6753 .
SetParam(
"rescale_grad", rescale_grad)
6754 .
SetParam(
"clip_gradient", clip_gradient)
6784 const std::vector<Symbol>& data,
6785 nnvm::Tuple<mx_float> lrs,
6786 nnvm::Tuple<mx_float> wds,
6789 int num_weights = 1) {
6790 return Operator(
"multi_sgd_update")
6793 .
SetParam(
"rescale_grad", rescale_grad)
6794 .
SetParam(
"clip_gradient", clip_gradient)
6795 .
SetParam(
"num_weights", num_weights)
6797 .CreateSymbol(symbol_name);
6835 const std::vector<Symbol>& data,
6836 nnvm::Tuple<mx_float> lrs,
6837 nnvm::Tuple<mx_float> wds,
6841 int num_weights = 1) {
6842 return Operator(
"multi_sgd_mom_update")
6846 .
SetParam(
"rescale_grad", rescale_grad)
6847 .
SetParam(
"clip_gradient", clip_gradient)
6848 .
SetParam(
"num_weights", num_weights)
6850 .CreateSymbol(symbol_name);
6875 const std::vector<Symbol>& data,
6876 nnvm::Tuple<mx_float> lrs,
6877 nnvm::Tuple<mx_float> wds,
6880 int num_weights = 1) {
6881 return Operator(
"multi_mp_sgd_update")
6884 .
SetParam(
"rescale_grad", rescale_grad)
6885 .
SetParam(
"clip_gradient", clip_gradient)
6886 .
SetParam(
"num_weights", num_weights)
6888 .CreateSymbol(symbol_name);
6926 const std::vector<Symbol>& data,
6927 nnvm::Tuple<mx_float> lrs,
6928 nnvm::Tuple<mx_float> wds,
6932 int num_weights = 1) {
6933 return Operator(
"multi_mp_sgd_mom_update")
6937 .
SetParam(
"rescale_grad", rescale_grad)
6938 .
SetParam(
"clip_gradient", clip_gradient)
6939 .
SetParam(
"num_weights", num_weights)
6941 .CreateSymbol(symbol_name);
6979 bool lazy_update =
true) {
6983 .
SetParam(
"rescale_grad", rescale_grad)
6984 .
SetParam(
"clip_gradient", clip_gradient)
6985 .
SetParam(
"lazy_update", lazy_update)
7044 bool lazy_update =
true) {
7049 .
SetParam(
"rescale_grad", rescale_grad)
7050 .
SetParam(
"clip_gradient", clip_gradient)
7051 .
SetParam(
"lazy_update", lazy_update)
7081 bool lazy_update =
true) {
7085 .
SetParam(
"rescale_grad", rescale_grad)
7086 .
SetParam(
"clip_gradient", clip_gradient)
7087 .
SetParam(
"lazy_update", lazy_update)
7121 bool lazy_update =
true) {
7122 return Operator(
"mp_sgd_mom_update")
7126 .
SetParam(
"rescale_grad", rescale_grad)
7127 .
SetParam(
"clip_gradient", clip_gradient)
7128 .
SetParam(
"lazy_update", lazy_update)
7181 double epsilon = 9.9999999392252903e-09,
7192 .
SetParam(
"rescale_grad", rescale_grad)
7263 bool lazy_update =
true) {
7270 .
SetParam(
"rescale_grad", rescale_grad)
7271 .
SetParam(
"clip_gradient", clip_gradient)
7272 .
SetParam(
"lazy_update", lazy_update)
7323 .
SetParam(
"rescale_grad", rescale_grad)
7324 .
SetParam(
"clip_gradient", clip_gradient)
7360 return Operator(
"mp_nag_mom_update")
7364 .
SetParam(
"rescale_grad", rescale_grad)
7365 .
SetParam(
"clip_gradient", clip_gradient)
7442 .
SetParam(
"rescale_grad", rescale_grad)
7443 .
SetParam(
"clip_gradient", clip_gradient)
7444 .
SetParam(
"clip_weights", clip_weights)
7510 return Operator(
"rmspropalex_update")
7516 .
SetParam(
"rescale_grad", rescale_grad)
7517 .
SetParam(
"clip_gradient", clip_gradient)
7518 .
SetParam(
"clip_weights", clip_weights)
7582 .
SetParam(
"rescale_grad", rescale_grad)
7583 .
SetParam(
"clip_gradient", clip_gradient)
7666 bool squeeze_axis =
false) {
7668 .
SetParam(
"num_outputs", num_outputs)
7670 .
SetParam(
"squeeze_axis", squeeze_axis)
7784 double constant_value = 0) {
7785 static const char *PadModeValues[] = {
7791 .
SetParam(
"mode", PadModeValues[
int(mode)])
7793 .
SetParam(
"constant_value", constant_value)
7883 static const char *GridGeneratorTransformTypeValues[] = {
7888 .
SetParam(
"transform_type", GridGeneratorTransformTypeValues[
int(transform_type)])
7889 .
SetParam(
"target_shape", target_shape)
7964 bool global_pool =
false,
7968 static const char *Pooling_v1PoolTypeValues[] = {
7973 static const char *Pooling_v1PoolingConventionValues[] = {
7979 .
SetParam(
"pool_type", Pooling_v1PoolTypeValues[
int(pool_type)])
7980 .
SetParam(
"global_pool", global_pool)
7981 .
SetParam(
"pooling_convention", Pooling_v1PoolingConventionValues[
int(pooling_convention)])
8050 uint32_t num_filter,
8054 uint32_t num_group = 1,
8055 uint64_t workspace = 1024,
8056 bool no_bias =
false,
8058 bool cudnn_off =
false,
8060 static const char *Convolution_v1CudnnTuneValues[] = {
8063 "limited_workspace",
8066 static const char *Convolution_v1LayoutValues[] = {
8075 .
SetParam(
"num_filter", num_filter)
8082 .
SetParam(
"cudnn_tune", Convolution_v1CudnnTuneValues[
int(cudnn_tune)])
8084 .
SetParam(
"layout", Convolution_v1LayoutValues[
int(layout)])
8112 const std::vector<Symbol>& data,
8116 bool center_crop =
false) {
8121 .
SetParam(
"center_crop", center_crop)
8123 .CreateSymbol(symbol_name);
8205 bool use_sequence_length =
false,
8208 .
SetParam(
"use_sequence_length", use_sequence_length)
8211 .
SetInput(
"sequence_length", sequence_length)
8244 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>()) {
8245 static const char *SpatialTransformerTransformTypeValues[] = {
8248 static const char *SpatialTransformerSamplerTypeValues[] = {
8251 return Operator(
"SpatialTransformer")
8252 .
SetParam(
"transform_type", SpatialTransformerTransformTypeValues[
int(transform_type)])
8253 .
SetParam(
"sampler_type", SpatialTransformerSamplerTypeValues[
int(sampler_type)])
8254 .
SetParam(
"target_shape", target_shape)
8345 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>()) {
8415 .
SetParam(
"pooled_size", pooled_size)
8416 .
SetParam(
"spatial_scale", spatial_scale)
8480 bool use_sequence_length =
false,
8483 .
SetParam(
"use_sequence_length", use_sequence_length)
8486 .
SetInput(
"sequence_length", sequence_length)
8564 static const char *L2NormalizationModeValues[] = {
8571 .
SetParam(
"mode", L2NormalizationModeValues[
int(mode)])
8625 static const char *MakeLossNormalizationValues[] = {
8631 .
SetParam(
"grad_scale", grad_scale)
8632 .
SetParam(
"valid_thresh", valid_thresh)
8633 .
SetParam(
"normalization", MakeLossNormalizationValues[
int(normalization)])
8657 mx_float regularization_coefficient = 1,
8658 bool use_linear =
false) {
8661 .
SetParam(
"regularization_coefficient", regularization_coefficient)
8662 .
SetParam(
"use_linear", use_linear)
8720 uint32_t kernel_size = 1,
8721 uint32_t max_displacement = 1,
8722 uint32_t stride1 = 1,
8723 uint32_t stride2 = 1,
8724 uint32_t pad_size = 0,
8725 bool is_multiply =
true) {
8727 .
SetParam(
"kernel_size", kernel_size)
8728 .
SetParam(
"max_displacement", max_displacement)
8732 .
SetParam(
"is_multiply", is_multiply)
8819 bool use_sequence_length =
false,
8823 .
SetParam(
"use_sequence_length", use_sequence_length)
8827 .
SetInput(
"sequence_length", sequence_length)
8844 return Operator(
"fill_element_0index")
8906 bool init_output =
true) {
8908 .
SetParam(
"init_output", init_output)
8925 bool init_output =
true) {
8926 return Operator(
"multi_all_finite")
8927 .
SetParam(
"num_arrays", num_arrays)
8928 .
SetParam(
"init_output", init_output)
8948 const std::string& op_type) {
9008 return Operator(
"broadcast_maximum")
9039 return Operator(
"broadcast_minimum")
9159 bool keep_highest =
false) {
9163 .
SetParam(
"target_shape", target_shape)
9164 .
SetParam(
"keep_highest", keep_highest)
9372 dmlc::optional<int> end) {
9447 .
SetInput(
"shape_like", shape_like)
9529 dmlc::optional<int> axis = dmlc::optional<int>()) {
9673 dmlc::optional<Shape> axis = dmlc::optional<Shape>()) {
9723 .
SetParam(
"block_size", block_size)
9773 .
SetParam(
"block_size", block_size)
9886 dmlc::optional<int> axis = dmlc::optional<int>(),
9887 bool keepdims =
false) {
9926 dmlc::optional<int> axis = dmlc::optional<int>(),
9927 bool keepdims =
false) {
10019 dmlc::optional<int> axis = dmlc::optional<int>(-1),
10020 bool keepdims =
false,
10022 static const char *PickModeValues[] = {
10029 .
SetParam(
"mode", PickModeValues[
int(mode)])
10094 bool transpose_a =
false,
10095 bool transpose_b =
false,
10097 static const char *DotForwardStypeValues[] = {
10104 .
SetParam(
"transpose_a", transpose_a)
10105 .
SetParam(
"transpose_b", transpose_b)
10106 .
SetParam(
"forward_stype", DotForwardStypeValues[
int(forward_stype)])
10138 bool transpose_a =
false,
10139 bool transpose_b =
false,
10141 static const char *Batch_dotForwardStypeValues[] = {
10148 .
SetParam(
"transpose_a", transpose_a)
10149 .
SetParam(
"transpose_b", transpose_b)
10150 .
SetParam(
"forward_stype", Batch_dotForwardStypeValues[
int(forward_stype)])
10548 dmlc::optional<int> lhs_begin = dmlc::optional<int>(),
10549 dmlc::optional<int> lhs_end = dmlc::optional<int>(),
10550 dmlc::optional<int> rhs_begin = dmlc::optional<int>(),
10551 dmlc::optional<int> rhs_end = dmlc::optional<int>()) {
10600 static const char *CastDtypeValues[] = {
10610 .
SetParam(
"dtype", CastDtypeValues[
int(dtype)])
11224 static const char *Amp_castDtypeValues[] = {
11234 .
SetParam(
"dtype", Amp_castDtypeValues[
int(dtype)])
11254 .
SetParam(
"num_outputs", num_outputs)
11302 dmlc::optional<int> axis = dmlc::optional<int>(-1),
11305 bool is_ascend =
false,
11307 static const char *TopkRetTypValues[] = {
11313 static const char *TopkDtypeValues[] = {
11323 .
SetParam(
"ret_typ", TopkRetTypValues[
int(ret_typ)])
11325 .
SetParam(
"dtype", TopkDtypeValues[
int(dtype)])
11362 dmlc::optional<int> axis = dmlc::optional<int>(-1),
11363 bool is_ascend =
true) {
11403 dmlc::optional<int> axis = dmlc::optional<int>(-1),
11404 bool is_ascend =
true,
11406 static const char *ArgsortDtypeValues[] = {
11416 .
SetParam(
"dtype", ArgsortDtypeValues[
int(dtype)])
11583 bool sparse_grad =
false) {
11584 static const char *EmbeddingDtypeValues[] = {
11595 .
SetParam(
"output_dim", output_dim)
11596 .
SetParam(
"dtype", EmbeddingDtypeValues[
int(dtype)])
11597 .
SetParam(
"sparse_grad", sparse_grad)
11668 static const char *TakeModeValues[] = {
11675 .
SetParam(
"mode", TakeModeValues[
int(mode)])
11761 double on_value = 1,
11762 double off_value = 0,
11764 static const char *One_hotDtypeValues[] = {
11777 .
SetParam(
"dtype", One_hotDtypeValues[
int(dtype)])
11903 return Operator(
"broadcast_equal")
11932 return Operator(
"broadcast_not_equal")
11961 return Operator(
"broadcast_greater")
11990 return Operator(
"broadcast_greater_equal")
12019 return Operator(
"broadcast_lesser")
12048 return Operator(
"broadcast_lesser_equal")
12077 return Operator(
"broadcast_logical_and")
12106 return Operator(
"broadcast_logical_or")
12135 return Operator(
"broadcast_logical_xor")
12339 static const char *Cast_storageStypeValues[] = {
12345 .
SetParam(
"stype", Cast_storageStypeValues[
int(stype)])
12408 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
12409 bool keepdims =
false,
12410 bool exclude =
false) {
12443 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
12444 bool keepdims =
false,
12445 bool exclude =
false) {
12478 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
12479 bool keepdims =
false,
12480 bool exclude =
false) {
12515 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
12516 bool keepdims =
false,
12517 bool exclude =
false) {
12552 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
12553 bool keepdims =
false,
12554 bool exclude =
false) {
12587 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
12588 bool keepdims =
false,
12589 bool exclude =
false) {
12622 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
12623 bool keepdims =
false,
12624 bool exclude =
false) {
12735 dmlc::optional<Shape> lhs_axes = dmlc::optional<Shape>(),
12736 dmlc::optional<Shape> rhs_axes = dmlc::optional<Shape>()) {
12790 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
12792 bool keepdims =
false) {
12793 static const char *NormOutDtypeValues[] = {
12805 .
SetParam(
"out_dtype", NormOutDtypeValues[
int(out_dtype)])
13211 bool global_pool =
false,
13212 bool cudnn_off =
false,
13216 dmlc::optional<int> p_value = dmlc::optional<int>(),
13217 dmlc::optional<bool> count_include_pad = dmlc::optional<bool>(),
13219 static const char *PoolingPoolTypeValues[] = {
13225 static const char *PoolingPoolingConventionValues[] = {
13230 static const char *PoolingLayoutValues[] = {
13241 .
SetParam(
"pool_type", PoolingPoolTypeValues[
int(pool_type)])
13242 .
SetParam(
"global_pool", global_pool)
13244 .
SetParam(
"pooling_convention", PoolingPoolingConventionValues[
int(pooling_convention)])
13248 .
SetParam(
"count_include_pad", count_include_pad)
13249 .
SetParam(
"layout", PoolingLayoutValues[
int(layout)])
13288 dmlc::optional<double> temperature = dmlc::optional<double>(),
13290 static const char *SoftmaxDtypeValues[] = {
13298 .
SetParam(
"temperature", temperature)
13299 .
SetParam(
"dtype", SoftmaxDtypeValues[
int(dtype)])
13339 dmlc::optional<double> temperature = dmlc::optional<double>(),
13341 static const char *SoftminDtypeValues[] = {
13349 .
SetParam(
"temperature", temperature)
13350 .
SetParam(
"dtype", SoftminDtypeValues[
int(dtype)])
13380 dmlc::optional<double> temperature = dmlc::optional<double>(),
13382 static const char *Log_softmaxDtypeValues[] = {
13390 .
SetParam(
"temperature", temperature)
13391 .
SetParam(
"dtype", Log_softmaxDtypeValues[
int(dtype)])
13428 uint32_t num_filter,
13434 uint32_t num_group = 1,
13435 uint64_t workspace = 512,
13436 bool no_bias =
true,
13438 bool cudnn_off =
false,
13440 static const char *DeconvolutionCudnnTuneValues[] = {
13443 "limited_workspace",
13446 static const char *DeconvolutionLayoutValues[] = {
13456 .
SetParam(
"num_filter", num_filter)
13461 .
SetParam(
"target_shape", target_shape)
13465 .
SetParam(
"cudnn_tune", DeconvolutionCudnnTuneValues[
int(cudnn_tune)])
13467 .
SetParam(
"layout", DeconvolutionLayoutValues[
int(layout)])
13494 static const char *ActivationActTypeValues[] = {
13502 .
SetParam(
"act_type", ActivationActTypeValues[
int(act_type)])
13579 double eps = 0.0010000000474974513,
13581 bool fix_gamma =
true,
13582 bool use_global_stats =
false,
13583 bool output_mean_var =
false,
13585 bool cudnn_off =
false) {
13590 .
SetParam(
"use_global_stats", use_global_stats)
13591 .
SetParam(
"output_mean_var", output_mean_var)
13597 .
SetInput(
"moving_mean", moving_mean)
13598 .
SetInput(
"moving_var", moving_var)
13671 bool use_data_lengths =
false,
13672 bool use_label_lengths =
false,
13674 static const char *CTCLossBlankLabelValues[] = {
13679 .
SetParam(
"use_data_lengths", use_data_lengths)
13680 .
SetParam(
"use_label_lengths", use_label_lengths)
13681 .
SetParam(
"blank_label", CTCLossBlankLabelValues[
int(blank_label)])
13684 .
SetInput(
"data_lengths", data_lengths)
13685 .
SetInput(
"label_lengths", label_lengths)
13735 bool no_bias =
false,
13736 bool flatten =
true) {
13738 .
SetParam(
"num_hidden", num_hidden)
13847 uint32_t num_filter,
13851 uint32_t num_group = 1,
13852 uint64_t workspace = 1024,
13853 bool no_bias =
false,
13855 bool cudnn_off =
false,
13857 static const char *ConvolutionCudnnTuneValues[] = {
13860 "limited_workspace",
13863 static const char *ConvolutionLayoutValues[] = {
13873 .
SetParam(
"num_filter", num_filter)
13880 .
SetParam(
"cudnn_tune", ConvolutionCudnnTuneValues[
int(cudnn_tune)])
13882 .
SetParam(
"layout", ConvolutionLayoutValues[
int(layout)])
13958 int num_filter = 0,
13960 uint64_t workspace = 512) {
13961 static const char *UpSamplingSampleTypeValues[] = {
13965 static const char *UpSamplingMultiInputModeValues[] = {
13971 .
SetParam(
"sample_type", UpSamplingSampleTypeValues[
int(sample_type)])
13973 .
SetParam(
"num_filter", num_filter)
13974 .
SetParam(
"multi_input_mode", UpSamplingMultiInputModeValues[
int(multi_input_mode)])
14077 bool output_mean_var =
false) {
14081 .
SetParam(
"output_mean_var", output_mean_var)
14172 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>(0)) {
14173 static const char *DropoutModeValues[] = {
14179 .
SetParam(
"mode", DropoutModeValues[
int(mode)])
14220 static const char *SoftmaxActivationModeValues[] = {
14224 return Operator(
"SoftmaxActivation")
14225 .
SetParam(
"mode", SoftmaxActivationModeValues[
int(mode)])
14259 dmlc::optional<Shape> axes = dmlc::optional<Shape>(),
14260 bool keepdims =
false) {
14302 mx_float upper_bound = 0.333999991) {
14303 static const char *LeakyReLUActTypeValues[] = {
14312 .
SetParam(
"act_type", LeakyReLUActTypeValues[
int(act_type)])
14314 .
SetParam(
"lower_bound", lower_bound)
14315 .
SetParam(
"upper_bound", upper_bound)
14401 uint32_t state_size,
14402 uint32_t num_layers,
14404 bool bidirectional =
false,
14406 bool state_outputs =
false,
14407 dmlc::optional<int> projection_size = dmlc::optional<int>(),
14408 dmlc::optional<double> lstm_state_clip_min = dmlc::optional<double>(),
14409 dmlc::optional<double> lstm_state_clip_max = dmlc::optional<double>(),
14410 bool lstm_state_clip_nan =
false,
14411 bool use_sequence_length =
false) {
14412 static const char *RNNModeValues[] = {
14419 .
SetParam(
"state_size", state_size)
14420 .
SetParam(
"num_layers", num_layers)
14421 .
SetParam(
"mode", RNNModeValues[
int(mode)])
14422 .
SetParam(
"bidirectional", bidirectional)
14424 .
SetParam(
"state_outputs", state_outputs)
14425 .
SetParam(
"projection_size", projection_size)
14426 .
SetParam(
"lstm_state_clip_min", lstm_state_clip_min)
14427 .
SetParam(
"lstm_state_clip_max", lstm_state_clip_max)
14428 .
SetParam(
"lstm_state_clip_nan", lstm_state_clip_nan)
14429 .
SetParam(
"use_sequence_length", use_sequence_length)
14431 .
SetInput(
"parameters", parameters)
14433 .
SetInput(
"state_cell", state_cell)
14434 .
SetInput(
"sequence_length", sequence_length)
14536 bool multi_output =
false,
14537 bool use_ignore =
false,
14538 bool preserve_shape =
false,
14540 bool out_grad =
false,
14542 static const char *SoftmaxOutputNormalizationValues[] = {
14548 .
SetParam(
"grad_scale", grad_scale)
14549 .
SetParam(
"ignore_label", ignore_label)
14550 .
SetParam(
"multi_output", multi_output)
14551 .
SetParam(
"use_ignore", use_ignore)
14552 .
SetParam(
"preserve_shape", preserve_shape)
14553 .
SetParam(
"normalization", SoftmaxOutputNormalizationValues[
int(normalization)])
14555 .
SetParam(
"smooth_alpha", smooth_alpha)
14590 uint32_t dim2 = 0) {
14662 bool fix_gamma =
true,
14663 bool use_global_stats =
false,
14664 bool output_mean_var =
false) {
14669 .
SetParam(
"use_global_stats", use_global_stats)
14670 .
SetParam(
"output_mean_var", output_mean_var)
14715 return Operator(
"softmax_cross_entropy")
14752 return Operator(
"LinearRegressionOutput")
14753 .
SetParam(
"grad_scale", grad_scale)
14791 return Operator(
"MAERegressionOutput")
14792 .
SetParam(
"grad_scale", grad_scale)
14836 return Operator(
"LogisticRegressionOutput")
14837 .
SetParam(
"grad_scale", grad_scale)
14852 mx_float sparseness_target = 0.100000001,
14854 mx_float momentum = 0.899999976) {
14855 return Operator(
"IdentityAttachKLSparseReg")
14856 .
SetParam(
"sparseness_target", sparseness_target)
14899 .
SetParam(
"rescale_grad", rescale_grad)
14900 .
SetParam(
"clip_gradient", clip_gradient)
14952 .
SetParam(
"rescale_grad", rescale_grad)
14953 .
SetParam(
"clip_gradient", clip_gradient)
14982 nnvm::Tuple<mx_float> lrs,
14983 nnvm::Tuple<mx_float> wds,
14986 int num_weights = 1) {
14987 return Operator(
"multi_sgd_update")
14990 .
SetParam(
"rescale_grad", rescale_grad)
14991 .
SetParam(
"clip_gradient", clip_gradient)
14992 .
SetParam(
"num_weights", num_weights)
15031 nnvm::Tuple<mx_float> lrs,
15032 nnvm::Tuple<mx_float> wds,
15036 int num_weights = 1) {
15037 return Operator(
"multi_sgd_mom_update")
15041 .
SetParam(
"rescale_grad", rescale_grad)
15042 .
SetParam(
"clip_gradient", clip_gradient)
15043 .
SetParam(
"num_weights", num_weights)
15069 nnvm::Tuple<mx_float> lrs,
15070 nnvm::Tuple<mx_float> wds,
15073 int num_weights = 1) {
15074 return Operator(
"multi_mp_sgd_update")
15077 .
SetParam(
"rescale_grad", rescale_grad)
15078 .
SetParam(
"clip_gradient", clip_gradient)
15079 .
SetParam(
"num_weights", num_weights)
15118 nnvm::Tuple<mx_float> lrs,
15119 nnvm::Tuple<mx_float> wds,
15123 int num_weights = 1) {
15124 return Operator(
"multi_mp_sgd_mom_update")
15128 .
SetParam(
"rescale_grad", rescale_grad)
15129 .
SetParam(
"clip_gradient", clip_gradient)
15130 .
SetParam(
"num_weights", num_weights)
15168 bool lazy_update =
true) {
15172 .
SetParam(
"rescale_grad", rescale_grad)
15173 .
SetParam(
"clip_gradient", clip_gradient)
15174 .
SetParam(
"lazy_update", lazy_update)
15231 bool lazy_update =
true) {
15236 .
SetParam(
"rescale_grad", rescale_grad)
15237 .
SetParam(
"clip_gradient", clip_gradient)
15238 .
SetParam(
"lazy_update", lazy_update)
15266 bool lazy_update =
true) {
15270 .
SetParam(
"rescale_grad", rescale_grad)
15271 .
SetParam(
"clip_gradient", clip_gradient)
15272 .
SetParam(
"lazy_update", lazy_update)
15304 bool lazy_update =
true) {
15305 return Operator(
"mp_sgd_mom_update")
15309 .
SetParam(
"rescale_grad", rescale_grad)
15310 .
SetParam(
"clip_gradient", clip_gradient)
15311 .
SetParam(
"lazy_update", lazy_update)
15362 double epsilon = 9.9999999392252903e-09,
15373 .
SetParam(
"rescale_grad", rescale_grad)
15438 mx_float epsilon = 9.99999994e-09,
15442 bool lazy_update =
true) {
15449 .
SetParam(
"rescale_grad", rescale_grad)
15450 .
SetParam(
"clip_gradient", clip_gradient)
15451 .
SetParam(
"lazy_update", lazy_update)
15500 .
SetParam(
"rescale_grad", rescale_grad)
15501 .
SetParam(
"clip_gradient", clip_gradient)
15535 return Operator(
"mp_nag_mom_update")
15539 .
SetParam(
"rescale_grad", rescale_grad)
15540 .
SetParam(
"clip_gradient", clip_gradient)
15605 mx_float epsilon = 9.99999994e-09,
15615 .
SetParam(
"rescale_grad", rescale_grad)
15616 .
SetParam(
"clip_gradient", clip_gradient)
15617 .
SetParam(
"clip_weights", clip_weights)
15676 mx_float epsilon = 9.99999994e-09,
15681 return Operator(
"rmspropalex_update")
15687 .
SetParam(
"rescale_grad", rescale_grad)
15688 .
SetParam(
"clip_gradient", clip_gradient)
15689 .
SetParam(
"clip_weights", clip_weights)
15751 .
SetParam(
"rescale_grad", rescale_grad)
15752 .
SetParam(
"clip_gradient", clip_gradient)
15833 bool squeeze_axis =
false) {
15835 .
SetParam(
"num_outputs", num_outputs)
15837 .
SetParam(
"squeeze_axis", squeeze_axis)
15940 double constant_value = 0) {
15941 static const char *PadModeValues[] = {
15947 .
SetParam(
"mode", PadModeValues[
int(mode)])
15949 .
SetParam(
"constant_value", constant_value)
16027 static const char *GridGeneratorTransformTypeValues[] = {
16032 .
SetParam(
"transform_type", GridGeneratorTransformTypeValues[
int(transform_type)])
16033 .
SetParam(
"target_shape", target_shape)
16091 bool global_pool =
false,
16095 static const char *Pooling_v1PoolTypeValues[] = {
16100 static const char *Pooling_v1PoolingConventionValues[] = {
16106 .
SetParam(
"pool_type", Pooling_v1PoolTypeValues[
int(pool_type)])
16107 .
SetParam(
"global_pool", global_pool)
16108 .
SetParam(
"pooling_convention", Pooling_v1PoolingConventionValues[
int(pooling_convention)])
16148 uint32_t num_filter,
16152 uint32_t num_group = 1,
16153 uint64_t workspace = 1024,
16154 bool no_bias =
false,
16156 bool cudnn_off =
false,
16158 static const char *Convolution_v1CudnnTuneValues[] = {
16161 "limited_workspace",
16164 static const char *Convolution_v1LayoutValues[] = {
16173 .
SetParam(
"num_filter", num_filter)
16180 .
SetParam(
"cudnn_tune", Convolution_v1CudnnTuneValues[
int(cudnn_tune)])
16182 .
SetParam(
"layout", Convolution_v1LayoutValues[
int(layout)])
16212 bool center_crop =
false) {
16217 .
SetParam(
"center_crop", center_crop)
16299 bool use_sequence_length =
false,
16301 return Operator(
"SequenceReverse")
16302 .
SetParam(
"use_sequence_length", use_sequence_length)
16305 .
SetInput(
"sequence_length", sequence_length)
16324 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>()) {
16325 static const char *SpatialTransformerTransformTypeValues[] = {
16328 static const char *SpatialTransformerSamplerTypeValues[] = {
16331 return Operator(
"SpatialTransformer")
16332 .
SetParam(
"transform_type", SpatialTransformerTransformTypeValues[
int(transform_type)])
16333 .
SetParam(
"sampler_type", SpatialTransformerSamplerTypeValues[
int(sampler_type)])
16334 .
SetParam(
"target_shape", target_shape)
16423 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>()) {
16424 return Operator(
"BilinearSampler")
16491 .
SetParam(
"pooled_size", pooled_size)
16492 .
SetParam(
"spatial_scale", spatial_scale)
16554 bool use_sequence_length =
false,
16557 .
SetParam(
"use_sequence_length", use_sequence_length)
16560 .
SetInput(
"sequence_length", sequence_length)
16628 static const char *L2NormalizationModeValues[] = {
16633 return Operator(
"L2Normalization")
16635 .
SetParam(
"mode", L2NormalizationModeValues[
int(mode)])
16677 static const char *MakeLossNormalizationValues[] = {
16683 .
SetParam(
"grad_scale", grad_scale)
16684 .
SetParam(
"valid_thresh", valid_thresh)
16685 .
SetParam(
"normalization", MakeLossNormalizationValues[
int(normalization)])
16707 mx_float regularization_coefficient = 1,
16708 bool use_linear =
false) {
16711 .
SetParam(
"regularization_coefficient", regularization_coefficient)
16712 .
SetParam(
"use_linear", use_linear)
16768 uint32_t kernel_size = 1,
16769 uint32_t max_displacement = 1,
16770 uint32_t stride1 = 1,
16771 uint32_t stride2 = 1,
16772 uint32_t pad_size = 0,
16773 bool is_multiply =
true) {
16775 .
SetParam(
"kernel_size", kernel_size)
16776 .
SetParam(
"max_displacement", max_displacement)
16780 .
SetParam(
"is_multiply", is_multiply)
16865 bool use_sequence_length =
false,
16869 .
SetParam(
"use_sequence_length", use_sequence_length)
16873 .
SetInput(
"sequence_length", sequence_length)
16888 return Operator(
"fill_element_0index")
16897 #endif // MXNET_CPP_OP_H_ Symbol Convolution(const std::string &symbol_name, Symbol data, Symbol weight, Symbol bias, Shape kernel, uint32_t num_filter, Shape stride=Shape(), Shape dilate=Shape(), Shape pad=Shape(), uint32_t num_group=1, uint64_t workspace=1024, bool no_bias=false, ConvolutionCudnnTune cudnn_tune=ConvolutionCudnnTune::kNone, bool cudnn_off=false, ConvolutionLayout layout=ConvolutionLayout::kNone)
Compute N-D convolution on *(N+2)*-D input.
Definition: op.h:5547
Symbol mp_sgd_mom_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol mom, Symbol weight32, mx_float lr, mx_float momentum=0, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, bool lazy_update=true)
Updater function for multi-precision sgd optimizer.
Definition: op.h:7111
Symbol fix(const std::string &symbol_name, Symbol data)
Returns element-wise rounded value to the nearest \ integer towards zero of the input.
Definition: op.h:2189
Symbol Crop(const std::string &symbol_name, const std::vector< Symbol > &data, int num_args, Shape offset=Shape(0, 0), Shape h_w=Shape(0, 0), bool center_crop=false)
.. note:: Crop is deprecated. Use slice instead.
Definition: op.h:8111
Symbol nag_mom_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol mom, mx_float lr, mx_float momentum=0, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1)
Update function for Nesterov Accelerated Gradient( NAG) optimizer. It updates the weights using the f...
Definition: op.h:7310
Symbol broadcast_mul(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns element-wise product of the input arrays with broadcasting.
Definition: op.h:1531
Symbol arcsin(const std::string &symbol_name, Symbol data)
Returns element-wise inverse sine of the input array.
Definition: op.h:4451
Symbol FullyConnected(const std::string &symbol_name, Symbol data, Symbol weight, Symbol bias, int num_hidden, bool no_bias=false, bool flatten=true)
Applies a linear transformation: :math:Y = XW^T + b.
Definition: op.h:5412
Symbol arccosh(const std::string &symbol_name, Symbol data)
Returns the element-wise inverse hyperbolic cosine of the input array, \ computed element-wise...
Definition: op.h:4674
Symbol arctan(const std::string &symbol_name, Symbol data)
Returns element-wise inverse tangent of the input array.
Definition: op.h:4504
Symbol SwapAxis(const std::string &symbol_name, Symbol data, uint32_t dim1=0, uint32_t dim2=0)
Interchanges two axes of an array.
Definition: op.h:6372
Symbol cast_storage(const std::string &symbol_name, Symbol data, Cast_storageStype stype)
Casts tensor storage type to the new type.
Definition: op.h:3840
Symbol add_n(const std::string &symbol_name, const std::vector< Symbol > &args)
Adds all input arguments element-wise.
Definition: op.h:1072
Symbol log1p(const std::string &symbol_name, Symbol data)
Returns element-wise log(1 + x) value of the input.
Definition: op.h:2486
SoftmaxActivationMode
Specifies how to compute the softmax. If set to instance, it computes softmax for each instance...
Definition: op.h:5926
Symbol SpatialTransformer(const std::string &symbol_name, Symbol data, Symbol loc, SpatialTransformerTransformType transform_type, SpatialTransformerSamplerType sampler_type, Shape target_shape=Shape(0, 0), dmlc::optional< bool > cudnn_off=dmlc::optional< bool >())
Applies a spatial transformer to input feature map.
Definition: op.h:8238
Symbol multi_sgd_update(const std::string &symbol_name, const std::vector< Symbol > &data, nnvm::Tuple< mx_float > lrs, nnvm::Tuple< mx_float > wds, mx_float rescale_grad=1, mx_float clip_gradient=-1, int num_weights=1)
Update function for Stochastic Gradient Descent (SDG) optimizer.
Definition: op.h:6783
Symbol argsort(const std::string &symbol_name, Symbol data, dmlc::optional< int > axis=dmlc::optional< int >(-1), bool is_ascend=true, ArgsortDtype dtype=ArgsortDtype::kFloat32)
Returns the indices that would sort an input array along the given axis.
Definition: op.h:2817
Symbol slice(const std::string &symbol_name, Symbol data, Shape begin, Shape end, Shape step=Shape())
Slices a region of the array.
Definition: op.h:523
Symbol diag(const std::string &symbol_name, Symbol data, int k=0, int axis1=0, int axis2=1)
Extracts a diagonal or constructs a diagonal array.
Definition: op.h:3693
Symbol exp(const std::string &symbol_name, Symbol data)
Returns element-wise exponential value of the input.
Definition: op.h:2397
Symbol transpose(const std::string &symbol_name, Symbol data, Shape axes=Shape())
Permutes the dimensions of an array.
Definition: op.h:435
Symbol clip(const std::string &symbol_name, Symbol data, mx_float a_min, mx_float a_max)
Clips (limits) the values in an array.
Definition: op.h:687
Symbol elemwise_div(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Divides arguments element-wise.
Definition: op.h:2931
Symbol Embedding(const std::string &symbol_name, Symbol data, Symbol weight, int input_dim, int output_dim, EmbeddingDtype dtype=EmbeddingDtype::kFloat32, bool sparse_grad=false)
Maps integer indices to vector representations (embeddings).
Definition: op.h:3015
Symbol ROIPooling(const std::string &symbol_name, Symbol data, Symbol rois, Shape pooled_size, mx_float spatial_scale)
Performs region of interest(ROI) pooling on the input array.
Definition: op.h:8409
Symbol broadcast_div(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns element-wise division of the input arrays with broadcasting.
Definition: op.h:1566
Convolution_v1Layout
Set layout for input, output and weight. Empty for default layout: NCHW for 2d and NCDHW for 3d...
Definition: op.h:8007
Symbol argmin(const std::string &symbol_name, Symbol data, dmlc::optional< int > axis=dmlc::optional< int >(), bool keepdims=false)
Returns indices of the minimum values along an axis.
Definition: op.h:1152
Symbol mp_nag_mom_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol mom, Symbol weight32, mx_float lr, mx_float momentum=0, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1)
Update function for multi-precision Nesterov Accelerated Gradient( NAG)
Definition: op.h:7350
Symbol dot(const std::string &symbol_name, Symbol lhs, Symbol rhs, bool transpose_a=false, bool transpose_b=false, DotForwardStype forward_stype=DotForwardStype::kNone)
Dot product of two arrays.
Definition: op.h:1345
Symbol topk(const std::string &symbol_name, Symbol data, dmlc::optional< int > axis=dmlc::optional< int >(-1), int k=1, TopkRetTyp ret_typ=TopkRetTyp::kIndices, bool is_ascend=false, TopkDtype dtype=TopkDtype::kFloat32)
Returns the top k elements in an input array along the given axis. The returned elements will be sort...
Definition: op.h:2701
Symbol SequenceReverse(const std::string &symbol_name, Symbol data, Symbol sequence_length, bool use_sequence_length=false, int axis=0)
Reverses the elements of each sequence.
Definition: op.h:8202
Symbol broadcast_lesser(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the result of element-wise lesser than (<) comparison operation.
Definition: op.h:3496
Symbol fill_element_0index(const std::string &symbol_name, Symbol lhs, Symbol mhs, Symbol rhs)
Fill one element of each line(row for python, column for R/Julia) in lhs according to index indicated...
Definition: op.h:8840
Symbol Convolution_v1(const std::string &symbol_name, Symbol data, Symbol weight, Symbol bias, Shape kernel, uint32_t num_filter, Shape stride=Shape(), Shape dilate=Shape(), Shape pad=Shape(), uint32_t num_group=1, uint64_t workspace=1024, bool no_bias=false, Convolution_v1CudnnTune cudnn_tune=Convolution_v1CudnnTune::kNone, bool cudnn_off=false, Convolution_v1Layout layout=Convolution_v1Layout::kNone)
This operator is DEPRECATED. Apply convolution to input then add a bias.
Definition: op.h:8045
Symbol broadcast_not_equal(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the result of element-wise not equal to (!=) comparison operation.
Definition: op.h:3403
TakeMode
Specify how out-of-bound indices bahave. Default is "clip". "clip" means clip to the range...
Definition: op.h:3045
Symbol SequenceLast(const std::string &symbol_name, Symbol data, Symbol sequence_length, bool use_sequence_length=false, int axis=0)
Takes the last element of a sequence.
Definition: op.h:8477
Symbol reciprocal(const std::string &symbol_name, Symbol data)
Returns the reciprocal of the argument, element-wise.
Definition: op.h:1961
Symbol LRN(const std::string &symbol_name, Symbol data, uint32_t nsize, mx_float alpha=9.99999975e-05, mx_float beta=0.75, mx_float knorm=2)
Applies local response normalization to the input.
Definition: op.h:5841
TopkRetTyp
The return type. "value" means to return the top k values, "indices" means to return the indices of t...
Definition: op.h:2641
namespace of mxnet
Definition: base.h:89
Symbol reshape_like(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Reshape some or all dimensions of lhs to have the same shape as some or all.
Definition: op.h:1812
Pooling_v1PoolingConvention
Pooling convention to be applied.
Definition: op.h:7904
Symbol broadcast_lesser_equal(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the result of element-wise lesser than or equal to (<=) comparison.
Definition: op.h:3527
Symbol moments(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axes=dmlc::optional< Shape >(), bool keepdims=false)
Calculate the mean and variance of data.
Definition: op.h:6006
Symbol sign(const std::string &symbol_name, Symbol data)
Returns element-wise sign of the input.
Definition: op.h:2015
GridGeneratorTransformType
The type of transformation. For affine, input data should be an affine matrix of size (batch...
Definition: op.h:7864
Cast_storageStype
Output storage type.
Definition: op.h:3789
dynamic shape class that can hold shape of arbirary dimension
Definition: shape.h:43
Symbol ones_like(const std::string &symbol_name, Symbol data)
Return an array of ones with the same shape and type as the input array.
Definition: op.h:1043
RNNMode
the type of RNN to compute
Definition: op.h:6085
PadMode
Padding type to use. "constant" pads with constant_value "edge" pads using the edge values of the inp...
Definition: op.h:7678
Symbol smooth_l1(const std::string &symbol_name, Symbol data, mx_float scalar)
Calculate Smooth L1 Loss(lhs, scalar) by summing.
Definition: op.h:3778
Operator & SetInput(const std::string &name, const Symbol &symbol)
add an input symbol
Symbol where(const std::string &symbol_name, Symbol condition, Symbol x, Symbol y)
Return the elements, either from x or y, depending on the condition.
Definition: op.h:3741
Symbol space_to_depth(const std::string &symbol_name, Symbol data, int block_size)
Rearranges(permutes) blocks of spatial data into depth. Similar to ONNX SpaceToDepth operator: https:...
Definition: op.h:987
Symbol expm1(const std::string &symbol_name, Symbol data)
Returns exp(x) - 1 computed element-wise on the input.
Definition: op.h:2511
Symbol elemwise_add(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Adds arguments element-wise.
Definition: op.h:2856
PoolingPoolType
Pooling type to be applied.
Definition: op.h:4707
Symbol relu(const std::string &symbol_name, Symbol data)
Computes rectified linear activation.
Definition: op.h:1625
Symbol reverse(const std::string &symbol_name, Symbol data, Shape axis)
Reverses the order of elements along given axis while preserving array shape.
Definition: op.h:820
Symbol rsqrt(const std::string &symbol_name, Symbol data)
Returns element-wise inverse square-root value of the input.
Definition: op.h:2275
Symbol mp_sgd_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol weight32, mx_float lr, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, bool lazy_update=true)
Updater function for multi-precision sgd optimizer.
Definition: op.h:7073
Symbol batch_dot(const std::string &symbol_name, Symbol lhs, Symbol rhs, bool transpose_a=false, bool transpose_b=false, Batch_dotForwardStype forward_stype=Batch_dotForwardStype::kNone)
Batchwise dot product.
Definition: op.h:1402
SpatialTransformerTransformType
transformation type
Definition: op.h:8217
ActivationActType
Activation function to be applied.
Definition: op.h:5129
Symbol sqrt(const std::string &symbol_name, Symbol data)
Returns element-wise square-root value of the input.
Definition: op.h:2249
Symbol L2Normalization(const std::string &symbol_name, Symbol data, mx_float eps=1.00000001e-10, L2NormalizationMode mode=L2NormalizationMode::kInstance)
Normalize the input array using the L2 norm.
Definition: op.h:8560
Symbol rint(const std::string &symbol_name, Symbol data)
Returns element-wise rounded value to the nearest integer of the input.
Definition: op.h:2073
Symbol sinh(const std::string &symbol_name, Symbol data)
Returns the hyperbolic sine of the input array, computed element-wise.
Definition: op.h:4582
Symbol scatter_nd(const std::string &symbol_name, Symbol data, Symbol indices, Shape shape)
Scatters data into a new tensor according to indices.
Definition: op.h:3339
Symbol broadcast_greater_equal(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the result of element-wise greater than or equal to (>=) comparison.
Definition: op.h:3465
Symbol adam_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol mean, Symbol var, mx_float lr, mx_float beta1=0.899999976, mx_float beta2=0.999000013, mx_float epsilon=9.99999994e-09, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, bool lazy_update=true)
Update function for Adam optimizer. Adam is seen as a generalization of AdaGrad.
Definition: op.h:7251
Symbol multi_mp_sgd_mom_update(const std::string &symbol_name, const std::vector< Symbol > &data, nnvm::Tuple< mx_float > lrs, nnvm::Tuple< mx_float > wds, mx_float momentum=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, int num_weights=1)
Momentum update function for multi-precision Stochastic Gradient Descent (SGD)
Definition: op.h:6925
Symbol UpSampling(const std::string &symbol_name, const std::vector< Symbol > &data, int scale, UpSamplingSampleType sample_type, int num_args, int num_filter=0, UpSamplingMultiInputMode multi_input_mode=UpSamplingMultiInputMode::kConcat, uint64_t workspace=512)
Upsamples the given input data.
Definition: op.h:5675
Symbol arcsinh(const std::string &symbol_name, Symbol data)
Returns the element-wise inverse hyperbolic sine of the input array, \ computed element-wise.
Definition: op.h:4654
Symbol MAERegressionOutput(const std::string &symbol_name, Symbol data, Symbol label, mx_float grad_scale=1)
Computes mean absolute error of the input.
Definition: op.h:6580
Symbol SliceChannel(const std::string &symbol_name, Symbol data, int num_outputs, int axis=1, bool squeeze_axis=false)
Splits an array along a particular axis into multiple sub-arrays.
Definition: op.h:7662
PoolingPoolingConvention
Pooling convention to be applied.
Definition: op.h:4716
Symbol broadcast_minimum(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns element-wise minimum of the input arrays with broadcasting.
Definition: op.h:222
ArgsortDtype
DType of the output indices. It is only valid when ret_typ is "indices" or "both". An error will be raised if the selected data type cannot precisely.
Definition: op.h:2777
Symbol broadcast_maximum(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns element-wise maximum of the input arrays with broadcasting.
Definition: op.h:189
Symbol Cast(const std::string &symbol_name, Symbol data, CastDtype dtype)
Casts all elements of the input to a new type.
Definition: op.h:1906
Symbol multi_sgd_mom_update(const std::string &symbol_name, const std::vector< Symbol > &data, nnvm::Tuple< mx_float > lrs, nnvm::Tuple< mx_float > wds, mx_float momentum=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, int num_weights=1)
Momentum update function for Stochastic Gradient Descent (SGD) optimizer.
Definition: op.h:6834
Symbol erf(const std::string &symbol_name, Symbol data)
Returns element-wise gauss error function of the input.
Definition: op.h:2326
DeconvolutionLayout
Set layout for input, output and weight. Empty for default layout, NCW for 1d,.
Definition: op.h:5038
Symbol trunc(const std::string &symbol_name, Symbol data)
Return the element-wise truncated value of the input.
Definition: op.h:2161
Pooling_v1PoolType
Pooling type to be applied.
Definition: op.h:7896
Symbol round(const std::string &symbol_name, Symbol data)
Returns element-wise rounded value to the nearest integer of the input.
Definition: op.h:2042
Symbol squeeze(const std::string &symbol_name, const std::vector< Symbol > &data, dmlc::optional< Shape > axis=dmlc::optional< Shape >())
Remove single-dimensional entries from the shape of an array. Same behavior of defining the output te...
Definition: op.h:885
TopkDtype
DType of the output indices when ret_typ is "indices" or "both". An error will.
Definition: op.h:2650
Symbol broadcast_logical_or(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the result of element-wise logical or with broadcasting.
Definition: op.h:3589
Symbol khatri_rao(const std::string &symbol_name, const std::vector< Symbol > &args)
Computes the Khatri-Rao product of the input matrices.
Definition: op.h:63
Symbol cos(const std::string &symbol_name, Symbol data)
Computes the element-wise cosine of the input array.
Definition: op.h:4394
Symbol max(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Computes the max of array elements over given axes.
Definition: op.h:4101
Symbol Correlation(const std::string &symbol_name, Symbol data1, Symbol data2, uint32_t kernel_size=1, uint32_t max_displacement=1, uint32_t stride1=1, uint32_t stride2=1, uint32_t pad_size=0, bool is_multiply=true)
Applies correlation to inputs.
Definition: op.h:8717
Amp_castDtype
Output data type.
Definition: op.h:2574
CTCLossBlankLabel
Set the label that is reserved for blank label.If "first", 0-th label is reserved, and label values for tokens in the vocabulary are between 1 and alphabet_size-1, and the padding mask is -1. If "last", last label value alphabet_size-1 is reserved for blank label instead, and label values for tokens in the vocabulary are between 0 and alphabet_size-2, and the.
Definition: op.h:5275
Symbol zeros_like(const std::string &symbol_name, Symbol data)
Return an array of zeros with the same shape, type and storage type as the input array.
Definition: op.h:1019
EmbeddingDtype
Data type of weight.
Definition: op.h:2942
Symbol broadcast_mod(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns element-wise modulo of the input arrays with broadcasting.
Definition: op.h:1597
Symbol cbrt(const std::string &symbol_name, Symbol data)
Returns element-wise cube-root value of the input.
Definition: op.h:2305
Symbol broadcast_like(const std::string &symbol_name, Symbol lhs, Symbol rhs, dmlc::optional< Shape > lhs_axes=dmlc::optional< Shape >(), dmlc::optional< Shape > rhs_axes=dmlc::optional< Shape >())
Broadcasts lhs to have the same shape as rhs.
Definition: op.h:4256
Symbol multi_all_finite(const std::string &symbol_name, const std::vector< Symbol > &data, int num_arrays=1, bool init_output=true)
Check if all the float numbers in all the arrays are finite (used for AMP)
Definition: op.h:100
operator helper functions
Symbol broadcast_logical_and(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the result of element-wise logical and with broadcasting.
Definition: op.h:3558
SoftmaxDtype
DType of the output in case this can't be inferred. Defaults to the same as.
Definition: op.h:4854
Symbol logical_not(const std::string &symbol_name, Symbol data)
Returns the result of logical NOT (!) function.
Definition: op.h:2565
Symbol tanh(const std::string &symbol_name, Symbol data)
Returns the hyperbolic tangent of the input array, computed element-wise.
Definition: op.h:4630
Symbol broadcast_to(const std::string &symbol_name, Symbol data, Shape shape=Shape())
Broadcasts the input array to a new shape.
Definition: op.h:4219
Symbol elemwise_sub(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Subtracts arguments element-wise.
Definition: op.h:2884
Symbol BilinearSampler(const std::string &symbol_name, Symbol data, Symbol grid, dmlc::optional< bool > cudnn_off=dmlc::optional< bool >())
Applies bilinear sampling to input feature map.
Definition: op.h:8342
DropoutMode
Whether to only turn on dropout during training or to also turn on for.
Definition: op.h:5858
NormOutDtype
The data type of the output.
Definition: op.h:4271
Symbol MakeLoss(const std::string &symbol_name, Symbol data, mx_float grad_scale=1, mx_float valid_thresh=0, MakeLossNormalization normalization=MakeLossNormalization::kNull)
Make your own loss function in network construction.
Definition: op.h:8620
Symbol all_finite(const std::string &symbol_name, Symbol data, bool init_output=true)
Check if all the float numbers in the array are finite (used for AMP)
Definition: op.h:80
Symbol log(const std::string &symbol_name, Symbol data)
Returns element-wise Natural logarithmic value of the input.
Definition: op.h:2418
Symbol norm(const std::string &symbol_name, Symbol data, int ord=2, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), NormOutDtype out_dtype=NormOutDtype::kNone, bool keepdims=false)
Computes the norm on an NDArray.
Definition: op.h:4325
Symbol broadcast_logical_xor(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the result of element-wise logical xor with broadcasting.
Definition: op.h:3620
SoftminDtype
DType of the output in case this can't be inferred. Defaults to the same as.
Definition: op.h:4915
Symbol sigmoid(const std::string &symbol_name, Symbol data)
Computes sigmoid of x element-wise.
Definition: op.h:1647
CastDtype
Output data type.
Definition: op.h:1877
DotForwardStype
The desired storage type of the forward output given by user, if thecombination of input storage type...
Definition: op.h:1280
ConvolutionLayout
Set layout for input, output and weight. Empty for default layout: NCW for 1d, NCHW for 2d and NCDHW ...
Definition: op.h:5441
Symbol IdentityAttachKLSparseReg(const std::string &symbol_name, Symbol data, mx_float sparseness_target=0.100000001, mx_float penalty=0.00100000005, mx_float momentum=0.899999976)
Apply a sparse regularization to the output a sigmoid activation function.
Definition: op.h:6647
Symbol LogisticRegressionOutput(const std::string &symbol_name, Symbol data, Symbol label, mx_float grad_scale=1)
Applies a logistic function to the input.
Definition: op.h:6627
Symbol ftrl_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol z, Symbol n, mx_float lr, mx_float lamda1=0.00999999978, mx_float beta=1, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1)
Update function for Ftrl optimizer. Referenced from Ad Click Prediction: a View from the Trenches...
Definition: op.h:7566
Symbol gamma(const std::string &symbol_name, Symbol data)
Returns the gamma function (extension of the factorial function \ to the reals), computed element-wis...
Definition: op.h:2529
Symbol sin(const std::string &symbol_name, Symbol data)
Computes the element-wise sine of the input array.
Definition: op.h:4370
Symbol hard_sigmoid(const std::string &symbol_name, Symbol data, mx_float alpha=0.200000003, mx_float beta=0.5)
Computes hard sigmoid of x element-wise.
Definition: op.h:1669
UpSamplingMultiInputMode
How to handle multiple input. concat means concatenate upsampled images along the channel dimension...
Definition: op.h:5604
Symbol CreateSymbol(const std::string &name="")
create a Symbol from the current operator
Symbol CTCLoss(const std::string &symbol_name, Symbol data, Symbol label, Symbol data_lengths, Symbol label_lengths, bool use_data_lengths=false, bool use_label_lengths=false, CTCLossBlankLabel blank_label=CTCLossBlankLabel::kFirst)
Connectionist Temporal Classification Loss.
Definition: op.h:5346
Symbol elemwise_mul(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Multiplies arguments element-wise.
Definition: op.h:2911
Batch_dotForwardStype
The desired storage type of the forward output given by user, if thecombination of input storage type...
Definition: op.h:1370
SpatialTransformerSamplerType
sampling type
Definition: op.h:8223
Symbol Pad(const std::string &symbol_name, Symbol data, PadMode mode, Shape pad_width, double constant_value=0)
Pads an input array with a constant or edge values of the array.
Definition: op.h:7780
Symbol square(const std::string &symbol_name, Symbol data)
Returns element-wise squared value of the input.
Definition: op.h:2219
One_hotDtype
DType of the output.
Definition: op.h:3170
Symbol nansum(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Computes the sum of array elements over given axes treating Not a Numbers.
Definition: op.h:4025
UpSamplingSampleType
upsampling method
Definition: op.h:5596
Symbol make_loss(const std::string &symbol_name, Symbol data)
Make your own loss function in network construction.
Definition: op.h:1771
Symbol SoftmaxActivation(const std::string &symbol_name, Symbol data, SoftmaxActivationMode mode=SoftmaxActivationMode::kInstance)
Applies softmax activation to input. This is intended for internal layers.
Definition: op.h:5964
Symbol broadcast_equal(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the result of element-wise equal to (==) comparison operation with.
Definition: op.h:3372
Symbol nanprod(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Computes the product of array elements over given axes treating Not a Numbers.
Definition: op.h:4064
Symbol Deconvolution(const std::string &symbol_name, Symbol data, Symbol weight, Symbol bias, Shape kernel, uint32_t num_filter, Shape stride=Shape(), Shape dilate=Shape(), Shape pad=Shape(), Shape adj=Shape(), Shape target_shape=Shape(), uint32_t num_group=1, uint64_t workspace=512, bool no_bias=true, DeconvolutionCudnnTune cudnn_tune=DeconvolutionCudnnTune::kNone, bool cudnn_off=false, DeconvolutionLayout layout=DeconvolutionLayout::kNone)
Computes 1D or 2D transposed convolution (aka fractionally strided convolution) of the input tensor...
Definition: op.h:5076
Symbol broadcast_add(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns element-wise sum of the input arrays with broadcasting.
Definition: op.h:1455
Operator & SetParam(const std::string &name, const T &value)
set config parameters
Definition: operator.h:58
Symbol tan(const std::string &symbol_name, Symbol data)
Computes the element-wise tangent of the input array.
Definition: op.h:4422
Convolution_v1CudnnTune
Whether to pick convolution algo by running performance test. Leads to higher startup time but may gi...
Definition: op.h:7997
Symbol repeat(const std::string &symbol_name, Symbol data, int repeats, dmlc::optional< int > axis=dmlc::optional< int >())
Repeats elements of an array.
Definition: op.h:732
Symbol slice_axis(const std::string &symbol_name, Symbol data, int axis, int begin, dmlc::optional< int > end)
Slices along a given axis.
Definition: op.h:568
Symbol expand_dims(const std::string &symbol_name, Symbol data, int axis)
Inserts a new axis of size 1 into the array shape.
Definition: op.h:459
Symbol arctanh(const std::string &symbol_name, Symbol data)
Returns the element-wise inverse hyperbolic tangent of the input array, \ computed element-wise...
Definition: op.h:4698
Symbol softmax_cross_entropy(const std::string &symbol_name, Symbol data, Symbol label)
Calculate cross entropy of softmax output and one-hot label.
Definition: op.h:6501
Symbol broadcast_axis(const std::string &symbol_name, Symbol data, Shape axis=Shape(), Shape size=Shape())
Broadcasts the input array over particular axes.
Definition: op.h:4180
Symbol abs(const std::string &symbol_name, Symbol data)
Returns element-wise absolute value of the input.
Definition: op.h:1988
Symbol cosh(const std::string &symbol_name, Symbol data)
Returns the hyperbolic cosine of the input array, computed element-wise.
Definition: op.h:4604
Symbol sort(const std::string &symbol_name, Symbol data, dmlc::optional< int > axis=dmlc::optional< int >(-1), bool is_ascend=true)
Returns a sorted copy of an input array along the given axis.
Definition: op.h:2763
Symbol gather_nd(const std::string &symbol_name, Symbol data, Symbol indices)
Gather elements or slices from data and store to a tensor whose shape is defined by indices...
Definition: op.h:3279
Symbol LayerNorm(const std::string &symbol_name, Symbol data, Symbol gamma, Symbol beta, int axis=-1, mx_float eps=9.99999975e-06, bool output_mean_var=false)
Layer normalization.
Definition: op.h:5797
Symbol slice_like(const std::string &symbol_name, Symbol data, Symbol shape_like, Shape axes=Shape())
Slices a region of the array like the shape of another array.
Definition: op.h:642
Symbol rmsprop_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol n, mx_float lr, mx_float gamma1=0.949999988, mx_float epsilon=9.99999994e-09, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, mx_float clip_weights=-1)
Update function for RMSProp optimizer.
Definition: op.h:7426
Symbol Custom(const std::string &symbol_name, const std::vector< Symbol > &data, const std::string &op_type)
Apply a custom operator implemented in a frontend language (like Python).
Definition: op.h:126
Symbol softmin(const std::string &symbol_name, Symbol data, int axis=-1, dmlc::optional< double > temperature=dmlc::optional< double >(), SoftminDtype dtype=SoftminDtype::kNone)
Applies the softmin function.
Definition: op.h:4956
Symbol Dropout(const std::string &symbol_name, Symbol data, mx_float p=0.5, DropoutMode mode=DropoutMode::kTraining, Shape axes=Shape(), dmlc::optional< bool > cudnn_off=dmlc::optional< bool >(0))
Applies dropout operation to input array.
Definition: op.h:5904
Symbol Pooling_v1(const std::string &symbol_name, Symbol data, Shape kernel=Shape(), Pooling_v1PoolType pool_type=Pooling_v1PoolType::kMax, bool global_pool=false, Pooling_v1PoolingConvention pooling_convention=Pooling_v1PoolingConvention::kValid, Shape stride=Shape(), Shape pad=Shape())
This operator is DEPRECATED. Perform pooling on the input.
Definition: op.h:7960
Symbol broadcast_hypot(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the hypotenuse of a right angled triangle, given its "legs" with broadcasting.
Definition: op.h:261
Symbol Activation(const std::string &symbol_name, Symbol data, ActivationActType act_type)
Applies an activation function element-wise to the input.
Definition: op.h:5156
float mx_float
manually define float
Definition: c_api.h:60
Symbol SVMOutput(const std::string &symbol_name, Symbol data, Symbol label, mx_float margin=1, mx_float regularization_coefficient=1, bool use_linear=false)
Computes support vector machine based transformation of the input.
Definition: op.h:8653
Symbol radians(const std::string &symbol_name, Symbol data)
Converts each element of the input array from degrees to radians.
Definition: op.h:4556
Symbol Concat(const std::string &symbol_name, const std::vector< Symbol > &data, int num_args, int dim=1)
Joins input arrays along a given axis.
Definition: op.h:5748
Symbol amp_multicast(const std::string &symbol_name, const std::vector< Symbol > &data, int num_outputs)
Cast function used by AMP, that casts its inputs to the common widest type.
Definition: op.h:2627
Symbol rmspropalex_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol n, Symbol g, Symbol delta, mx_float lr, mx_float gamma1=0.949999988, mx_float gamma2=0.899999976, mx_float epsilon=9.99999994e-09, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, mx_float clip_weights=-1)
Update function for RMSPropAlex optimizer.
Definition: op.h:7496
Symbol log_softmax(const std::string &symbol_name, Symbol data, int axis=-1, dmlc::optional< double > temperature=dmlc::optional< double >(), Log_softmaxDtype dtype=Log_softmaxDtype::kNone)
Computes the log softmax of the input. This is equivalent to computing softmax followed by log...
Definition: op.h:5008
PoolingLayout
Set layout for input and output. Empty for default layout: NCW for 1d, NCHW for 2d and NCDHW for 3d...
Definition: op.h:4725
L2NormalizationMode
Specify the dimension along which to compute L2 norm.
Definition: op.h:8492
Symbol SequenceMask(const std::string &symbol_name, Symbol data, Symbol sequence_length, bool use_sequence_length=false, mx_float value=0, int axis=0)
Sets all elements outside the sequence to a constant value.
Definition: op.h:8816
Symbol stack(const std::string &symbol_name, const std::vector< Symbol > &data, int num_args, int axis=0)
Join a sequence of arrays along a new axis.
Definition: op.h:852
Symbol floor(const std::string &symbol_name, Symbol data)
Returns element-wise floor of the input.
Definition: op.h:2131
Symbol RNN(const std::string &symbol_name, Symbol data, Symbol parameters, Symbol state, Symbol state_cell, Symbol sequence_length, uint32_t state_size, uint32_t num_layers, RNNMode mode, bool bidirectional=false, mx_float p=0, bool state_outputs=false, dmlc::optional< int > projection_size=dmlc::optional< int >(), dmlc::optional< double > lstm_state_clip_min=dmlc::optional< double >(), dmlc::optional< double > lstm_state_clip_max=dmlc::optional< double >(), bool lstm_state_clip_nan=false, bool use_sequence_length=false)
Applies recurrent layers to input data. Currently, vanilla RNN, LSTM and GRU are implemented, with both multi-layer and bidirectional support.
Definition: op.h:6168
Symbol broadcast_sub(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns element-wise difference of the input arrays with broadcasting.
Definition: op.h:1496
Log_softmaxDtype
DType of the output in case this can't be inferred. Defaults to the same as.
Definition: op.h:4977
Symbol take(const std::string &symbol_name, Symbol a, Symbol indices, int axis=0, TakeMode mode=TakeMode::kClip)
Takes elements from an input array along the given axis.
Definition: op.h:3113
Symbol ceil(const std::string &symbol_name, Symbol data)
Returns element-wise ceiling of the input.
Definition: op.h:2102
Symbol gammaln(const std::string &symbol_name, Symbol data)
Returns element-wise log of the absolute value of the gamma function \ of the input.
Definition: op.h:2547
Symbol tile(const std::string &symbol_name, Symbol data, Shape reps)
Repeats the whole array multiple times.
Definition: op.h:788
Symbol min(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Computes the min of array elements over given axes.
Definition: op.h:4138
Symbol signum_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol mom, mx_float lr, mx_float momentum=0, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, mx_float wd_lh=0)
SIGN momentUM (Signum) optimizer.
Definition: op.h:6739
Symbol depth_to_space(const std::string &symbol_name, Symbol data, int block_size)
Rearranges(permutes) data from depth into blocks of spatial data. Similar to ONNX DepthToSpace operat...
Definition: op.h:935
Symbol softmax(const std::string &symbol_name, Symbol data, int axis=-1, dmlc::optional< double > temperature=dmlc::optional< double >(), SoftmaxDtype dtype=SoftmaxDtype::kNone)
Applies the softmax function.
Definition: op.h:4894
DeconvolutionCudnnTune
Whether to pick convolution algorithm by running performance test.
Definition: op.h:5029
ConvolutionCudnnTune
Whether to pick convolution algo by running performance test.
Definition: op.h:5431
Symbol prod(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Computes the product of array elements over given axes.
Definition: op.h:3986
Symbol pick(const std::string &symbol_name, Symbol data, Symbol index, dmlc::optional< int > axis=dmlc::optional< int >(-1), bool keepdims=false, PickMode mode=PickMode::kClip)
Picks elements from an input array according to the input indices along the.
Definition: op.h:1257
Symbol broadcast_greater(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns the result of element-wise greater than (>) comparison operation.
Definition: op.h:3434
Symbol rcbrt(const std::string &symbol_name, Symbol data)
Returns element-wise inverse cube-root value of the input.
Definition: op.h:2371
PickMode
Specify how out-of-bound indices behave. Default is "clip". "clip" means clip to the range...
Definition: op.h:1196
Symbol signsgd_update(const std::string &symbol_name, Symbol weight, Symbol grad, mx_float lr, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1)
Update function for SignSGD optimizer.
Definition: op.h:6688
Symbol broadcast_power(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Returns result of first array elements raised to powers from second array,.
Definition: op.h:156
Symbol LeakyReLU(const std::string &symbol_name, Symbol data, Symbol gamma, LeakyReLUActType act_type=LeakyReLUActType::kLeaky, mx_float slope=0.25, mx_float lower_bound=0.125, mx_float upper_bound=0.333999991)
Applies Leaky rectified linear unit activation element-wise to the input.
Definition: op.h:6058
SoftmaxOutputNormalization
Normalizes the gradient.
Definition: op.h:6213
Symbol SoftmaxOutput(const std::string &symbol_name, Symbol data, Symbol label, mx_float grad_scale=1, mx_float ignore_label=-1, bool multi_output=false, bool use_ignore=false, bool preserve_shape=false, SoftmaxOutputNormalization normalization=SoftmaxOutputNormalization::kNull, bool out_grad=false, mx_float smooth_alpha=0)
Computes the gradient of cross entropy loss with respect to softmax output.
Definition: op.h:6314
Symbol Flatten(const std::string &symbol_name, Symbol data)
Flattens the input array into a 2-D array by collapsing the higher dimensions.
Definition: op.h:392
Symbol BlockGrad(const std::string &symbol_name, Symbol data)
Stops gradient computation.
Definition: op.h:1735
LeakyReLUActType
Activation function to be applied.
Definition: op.h:6019
Symbol sgd_mom_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol mom, mx_float lr, mx_float momentum=0, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, bool lazy_update=true)
Momentum update function for Stochastic Gradient Descent (SGD) optimizer.
Definition: op.h:7035
Symbol amp_cast(const std::string &symbol_name, Symbol data, Amp_castDtype dtype)
Cast function between low precision float/FP32 used by AMP.
Definition: op.h:2596
Symbol arccos(const std::string &symbol_name, Symbol data)
Returns element-wise inverse cosine of the input array.
Definition: op.h:4476
Symbol multi_mp_sgd_update(const std::string &symbol_name, const std::vector< Symbol > &data, nnvm::Tuple< mx_float > lrs, nnvm::Tuple< mx_float > wds, mx_float rescale_grad=1, mx_float clip_gradient=-1, int num_weights=1)
Update function for multi-precision Stochastic Gradient Descent (SDG) optimizer.
Definition: op.h:6874
Symbol Pooling(const std::string &symbol_name, Symbol data, Shape kernel=Shape(), PoolingPoolType pool_type=PoolingPoolType::kMax, bool global_pool=false, bool cudnn_off=false, PoolingPoolingConvention pooling_convention=PoolingPoolingConvention::kValid, Shape stride=Shape(), Shape pad=Shape(), dmlc::optional< int > p_value=dmlc::optional< int >(), dmlc::optional< bool > count_include_pad=dmlc::optional< bool >(), PoolingLayout layout=PoolingLayout::kNone)
Performs pooling on the input.
Definition: op.h:4805
Symbol argmax_channel(const std::string &symbol_name, Symbol data)
Returns argmax indices of each channel from the input array.
Definition: op.h:1185
Symbol batch_take(const std::string &symbol_name, Symbol a, Symbol indices)
Takes elements from a data batch.
Definition: op.h:3159
Symbol mean(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Computes the mean of array elements over given axes.
Definition: op.h:3949
Symbol LinearRegressionOutput(const std::string &symbol_name, Symbol data, Symbol label, mx_float grad_scale=1)
Computes and optimizes for squared loss during backward propagation. Just outputs data during forward...
Definition: op.h:6539
Symbol softsign(const std::string &symbol_name, Symbol data)
Computes softsign of x element-wise.
Definition: op.h:1695
Symbol sgd_update(const std::string &symbol_name, Symbol weight, Symbol grad, mx_float lr, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, bool lazy_update=true)
Update function for Stochastic Gradient Descent (SGD) optimizer.
Definition: op.h:6972
Symbol InstanceNorm(const std::string &symbol_name, Symbol data, Symbol gamma, Symbol beta, mx_float eps=0.00100000005)
Applies instance normalization to the n-dimensional input array.
Definition: op.h:7848
Symbol Reshape(const std::string &symbol_name, Symbol data, Shape shape=Shape(), bool reverse=false, Shape target_shape=Shape(), bool keep_highest=false)
Reshapes the input array.
Definition: op.h:344
Symbol degrees(const std::string &symbol_name, Symbol data)
Converts each element of the input array from radians to degrees.
Definition: op.h:4530
Symbol ftml_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol d, Symbol v, Symbol z, mx_float lr, int t, mx_float beta1=0.600000024, mx_float beta2=0.999000013, double epsilon=9.9999999392252903e-09, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_grad=-1)
The FTML optimizer described in FTML - Follow the Moving Leader in Deep Learning, available at http:/...
Definition: op.h:7171
Symbol shape_array(const std::string &symbol_name, Symbol data, dmlc::optional< int > lhs_begin=dmlc::optional< int >(), dmlc::optional< int > lhs_end=dmlc::optional< int >(), dmlc::optional< int > rhs_begin=dmlc::optional< int >(), dmlc::optional< int > rhs_end=dmlc::optional< int >())
Returns a 1D int64 array containing the shape of data.
Definition: op.h:1839
Symbol BatchNorm(const std::string &symbol_name, Symbol data, Symbol gamma, Symbol beta, Symbol moving_mean, Symbol moving_var, double eps=0.0010000000474974513, mx_float momentum=0.899999976, bool fix_gamma=true, bool use_global_stats=false, bool output_mean_var=false, int axis=1, bool cudnn_off=false)
Batch normalization.
Definition: op.h:5240
Symbol one_hot(const std::string &symbol_name, Symbol indices, int depth, double on_value=1, double off_value=0, One_hotDtype dtype=One_hotDtype::kFloat32)
Returns a one-hot array.
Definition: op.h:3224
Symbol negative(const std::string &symbol_name, Symbol data)
Numerical negative of the argument, element-wise.
Definition: op.h:1938
Symbol BatchNorm_v1(const std::string &symbol_name, Symbol data, Symbol gamma, Symbol beta, mx_float eps=0.00100000005, mx_float momentum=0.899999976, bool fix_gamma=true, bool use_global_stats=false, bool output_mean_var=false)
Batch normalization.
Definition: op.h:6443
Symbol sum(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Computes the sum of array elements over given axes.
Definition: op.h:3912
Symbol GridGenerator(const std::string &symbol_name, Symbol data, GridGeneratorTransformType transform_type, Shape target_shape=Shape(0, 0))
Generates 2D sampling grid for bilinear sampling.
Definition: op.h:7879
Symbol size_array(const std::string &symbol_name, Symbol data)
Returns a 1D int64 array containing the size of data.
Definition: op.h:1868
Symbol argmax(const std::string &symbol_name, Symbol data, dmlc::optional< int > axis=dmlc::optional< int >(), bool keepdims=false)
Returns indices of the maximum values along an axis.
Definition: op.h:1110
Symbol erfinv(const std::string &symbol_name, Symbol data)
Returns element-wise inverse gauss error function of the input.
Definition: op.h:2347
Operator interface.
Definition: operator.h:43
Symbol interface.
Definition: symbol.h:72
MakeLossNormalization
If this is set to null, the output gradient will not be normalized. If this is set to batch...
Definition: op.h:8580
Symbol log10(const std::string &symbol_name, Symbol data)
Returns element-wise Base-10 logarithmic value of the input.
Definition: op.h:2439
Symbol log2(const std::string &symbol_name, Symbol data)
Returns element-wise Base-2 logarithmic value of the input.
Definition: op.h:2460