8 #ifndef MXNET_CPP_OP_H_ 9 #define MXNET_CPP_OP_H_ 17 #include "dmlc/optional.h" 63 const std::vector<Symbol>& args) {
66 .CreateSymbol(symbol_name);
85 const std::vector<Symbol>& data,
86 const std::string& op_type) {
89 .CreateSymbol(symbol_name);
150 return Operator(
"broadcast_maximum")
183 return Operator(
"broadcast_minimum")
307 bool keep_highest =
false) {
311 .
SetParam(
"target_shape", target_shape)
312 .
SetParam(
"keep_highest", keep_highest)
530 dmlc::optional<int> end) {
693 dmlc::optional<int> axis = dmlc::optional<int>()) {
811 const std::vector<Symbol>& data,
818 .CreateSymbol(symbol_name);
844 const std::vector<Symbol>& data,
845 dmlc::optional<Shape> axis = dmlc::optional<Shape>()) {
849 .CreateSymbol(symbol_name);
1031 const std::vector<Symbol>& args) {
1034 .CreateSymbol(symbol_name);
1070 dmlc::optional<int> axis = dmlc::optional<int>(),
1071 bool keepdims =
false) {
1112 dmlc::optional<int> axis = dmlc::optional<int>(),
1113 bool keepdims =
false) {
1218 dmlc::optional<int> axis = dmlc::optional<int>(-1),
1219 bool keepdims =
false,
1221 static const char *PickModeValues[] = {
1228 .
SetParam(
"mode", PickModeValues[
int(mode)])
1306 bool transpose_a =
false,
1307 bool transpose_b =
false,
1309 static const char *DotForwardStypeValues[] = {
1316 .
SetParam(
"transpose_a", transpose_a)
1317 .
SetParam(
"transpose_b", transpose_b)
1318 .
SetParam(
"forward_stype", DotForwardStypeValues[
int(forward_stype)])
1363 bool transpose_a =
false,
1364 bool transpose_b =
false,
1366 static const char *Batch_dotForwardStypeValues[] = {
1373 .
SetParam(
"transpose_a", transpose_a)
1374 .
SetParam(
"transpose_b", transpose_b)
1375 .
SetParam(
"forward_stype", Batch_dotForwardStypeValues[
int(forward_stype)])
1799 dmlc::optional<int> lhs_begin = dmlc::optional<int>(),
1800 dmlc::optional<int> lhs_end = dmlc::optional<int>(),
1801 dmlc::optional<int> rhs_begin = dmlc::optional<int>(),
1802 dmlc::optional<int> rhs_end = dmlc::optional<int>()) {
1867 static const char *CastDtypeValues[] = {
1877 .
SetParam(
"dtype", CastDtypeValues[
int(dtype)])
2569 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
2570 bool keepdims =
false,
2571 bool exclude =
false) {
2606 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
2607 bool keepdims =
false,
2608 bool exclude =
false) {
2643 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
2644 bool keepdims =
false,
2645 bool exclude =
false) {
2682 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
2683 bool keepdims =
false,
2684 bool exclude =
false) {
2721 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
2722 bool keepdims =
false,
2723 bool exclude =
false) {
2758 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
2759 bool keepdims =
false,
2760 bool exclude =
false) {
2795 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
2796 bool keepdims =
false,
2797 bool exclude =
false) {
2914 dmlc::optional<Shape> lhs_axes = dmlc::optional<Shape>(),
2915 dmlc::optional<Shape> rhs_axes = dmlc::optional<Shape>()) {
2970 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
2971 bool keepdims =
false) {
3047 dmlc::optional<int> axis = dmlc::optional<int>(-1),
3050 bool is_ascend =
false,
3052 static const char *TopkRetTypValues[] = {
3058 static const char *TopkDtypeValues[] = {
3068 .
SetParam(
"ret_typ", TopkRetTypValues[
int(ret_typ)])
3070 .
SetParam(
"dtype", TopkDtypeValues[
int(dtype)])
3109 dmlc::optional<int> axis = dmlc::optional<int>(-1),
3110 bool is_ascend =
true) {
3163 dmlc::optional<int> axis = dmlc::optional<int>(-1),
3164 bool is_ascend =
true,
3166 static const char *ArgsortDtypeValues[] = {
3176 .
SetParam(
"dtype", ArgsortDtypeValues[
int(dtype)])
3365 bool sparse_grad =
false) {
3366 static const char *EmbeddingDtypeValues[] = {
3377 .
SetParam(
"output_dim", output_dim)
3378 .
SetParam(
"dtype", EmbeddingDtypeValues[
int(dtype)])
3379 .
SetParam(
"sparse_grad", sparse_grad)
3459 static const char *TakeModeValues[] = {
3466 .
SetParam(
"mode", TakeModeValues[
int(mode)])
3568 double on_value = 1,
3569 double off_value = 0,
3571 static const char *One_hotDtypeValues[] = {
3584 .
SetParam(
"dtype", One_hotDtypeValues[
int(dtype)])
3747 return Operator(
"broadcast_not_equal")
3778 return Operator(
"broadcast_greater")
3809 return Operator(
"broadcast_greater_equal")
3840 return Operator(
"broadcast_lesser")
3871 return Operator(
"broadcast_lesser_equal")
3902 return Operator(
"broadcast_logical_and")
3933 return Operator(
"broadcast_logical_or")
3964 return Operator(
"broadcast_logical_xor")
4184 static const char *Cast_storageStypeValues[] = {
4190 .
SetParam(
"stype", Cast_storageStypeValues[
int(stype)])
4640 bool global_pool =
false,
4641 bool cudnn_off =
false,
4645 dmlc::optional<int> p_value = dmlc::optional<int>(),
4646 dmlc::optional<bool> count_include_pad = dmlc::optional<bool>()) {
4647 static const char *PoolingPoolTypeValues[] = {
4653 static const char *PoolingPoolingConventionValues[] = {
4660 .
SetParam(
"pool_type", PoolingPoolTypeValues[
int(pool_type)])
4661 .
SetParam(
"global_pool", global_pool)
4663 .
SetParam(
"pooling_convention", PoolingPoolingConventionValues[
int(pooling_convention)])
4667 .
SetParam(
"count_include_pad", count_include_pad)
4707 dmlc::optional<double> temperature = dmlc::optional<double>()) {
4710 .
SetParam(
"temperature", temperature)
4751 dmlc::optional<double> temperature = dmlc::optional<double>()) {
4754 .
SetParam(
"temperature", temperature)
4785 dmlc::optional<double> temperature = dmlc::optional<double>()) {
4788 .
SetParam(
"temperature", temperature)
4847 uint32_t num_filter,
4853 uint32_t num_group = 1,
4854 uint64_t workspace = 512,
4855 bool no_bias =
true,
4857 bool cudnn_off =
false,
4859 static const char *DeconvolutionCudnnTuneValues[] = {
4862 "limited_workspace",
4865 static const char *DeconvolutionLayoutValues[] = {
4875 .
SetParam(
"num_filter", num_filter)
4880 .
SetParam(
"target_shape", target_shape)
4884 .
SetParam(
"cudnn_tune", DeconvolutionCudnnTuneValues[
int(cudnn_tune)])
4886 .
SetParam(
"layout", DeconvolutionLayoutValues[
int(layout)])
4925 static const char *ActivationActTypeValues[] = {
4933 .
SetParam(
"act_type", ActivationActTypeValues[
int(act_type)])
5014 bool fix_gamma =
true,
5015 bool use_global_stats =
false,
5016 bool output_mean_var =
false,
5018 bool cudnn_off =
false) {
5023 .
SetParam(
"use_global_stats", use_global_stats)
5024 .
SetParam(
"output_mean_var", output_mean_var)
5030 .
SetInput(
"moving_mean", moving_mean)
5031 .
SetInput(
"moving_var", moving_var)
5117 bool use_data_lengths =
false,
5118 bool use_label_lengths =
false,
5120 static const char *CTCLossBlankLabelValues[] = {
5125 .
SetParam(
"use_data_lengths", use_data_lengths)
5126 .
SetParam(
"use_label_lengths", use_label_lengths)
5127 .
SetParam(
"blank_label", CTCLossBlankLabelValues[
int(blank_label)])
5130 .
SetInput(
"data_lengths", data_lengths)
5131 .
SetInput(
"label_lengths", label_lengths)
5258 uint32_t num_filter,
5262 uint32_t num_group = 1,
5263 uint64_t workspace = 1024,
5264 bool no_bias =
false,
5266 bool cudnn_off =
false,
5268 static const char *ConvolutionCudnnTuneValues[] = {
5271 "limited_workspace",
5274 static const char *ConvolutionLayoutValues[] = {
5284 .
SetParam(
"num_filter", num_filter)
5291 .
SetParam(
"cudnn_tune", ConvolutionCudnnTuneValues[
int(cudnn_tune)])
5293 .
SetParam(
"layout", ConvolutionLayoutValues[
int(layout)])
5331 const std::vector<Symbol>& data,
5337 uint64_t workspace = 512) {
5338 static const char *UpSamplingSampleTypeValues[] = {
5342 static const char *UpSamplingMultiInputModeValues[] = {
5348 .
SetParam(
"sample_type", UpSamplingSampleTypeValues[
int(sample_type)])
5350 .
SetParam(
"num_filter", num_filter)
5351 .
SetParam(
"multi_input_mode", UpSamplingMultiInputModeValues[
int(multi_input_mode)])
5354 .CreateSymbol(symbol_name);
5404 const std::vector<Symbol>& data,
5411 .CreateSymbol(symbol_name);
5458 bool output_mean_var =
false) {
5462 .
SetParam(
"output_mean_var", output_mean_var)
5563 static const char *DropoutModeValues[] = {
5569 .
SetParam(
"mode", DropoutModeValues[
int(mode)])
5619 static const char *SoftmaxActivationModeValues[] = {
5623 return Operator(
"SoftmaxActivation")
5624 .
SetParam(
"mode", SoftmaxActivationModeValues[
int(mode)])
5677 bool no_bias =
false,
5678 bool flatten =
true) {
5680 .
SetParam(
"num_hidden", num_hidden)
5798 double constant_value = 0) {
5799 static const char *PadModeValues[] = {
5805 .
SetParam(
"mode", PadModeValues[
int(mode)])
5807 .
SetParam(
"constant_value", constant_value)
5859 static const char *LeakyReLUActTypeValues[] = {
5867 .
SetParam(
"act_type", LeakyReLUActTypeValues[
int(act_type)])
5869 .
SetParam(
"lower_bound", lower_bound)
5870 .
SetParam(
"upper_bound", upper_bound)
5907 uint32_t dim2 = 0) {
5981 bool fix_gamma =
true,
5982 bool use_global_stats =
false,
5983 bool output_mean_var =
false) {
5988 .
SetParam(
"use_global_stats", use_global_stats)
5989 .
SetParam(
"output_mean_var", output_mean_var)
6036 return Operator(
"softmax_cross_entropy")
6075 return Operator(
"LinearRegressionOutput")
6076 .
SetParam(
"grad_scale", grad_scale)
6116 return Operator(
"MAERegressionOutput")
6117 .
SetParam(
"grad_scale", grad_scale)
6163 return Operator(
"LogisticRegressionOutput")
6164 .
SetParam(
"grad_scale", grad_scale)
6184 return Operator(
"IdentityAttachKLSparseReg")
6185 .
SetParam(
"sparseness_target", sparseness_target)
6230 .
SetParam(
"rescale_grad", rescale_grad)
6231 .
SetParam(
"clip_gradient", clip_gradient)
6285 .
SetParam(
"rescale_grad", rescale_grad)
6286 .
SetParam(
"clip_gradient", clip_gradient)
6329 bool lazy_update =
true) {
6333 .
SetParam(
"rescale_grad", rescale_grad)
6334 .
SetParam(
"clip_gradient", clip_gradient)
6335 .
SetParam(
"lazy_update", lazy_update)
6394 bool lazy_update =
true) {
6399 .
SetParam(
"rescale_grad", rescale_grad)
6400 .
SetParam(
"clip_gradient", clip_gradient)
6401 .
SetParam(
"lazy_update", lazy_update)
6431 bool lazy_update =
true) {
6435 .
SetParam(
"rescale_grad", rescale_grad)
6436 .
SetParam(
"clip_gradient", clip_gradient)
6437 .
SetParam(
"lazy_update", lazy_update)
6471 bool lazy_update =
true) {
6472 return Operator(
"mp_sgd_mom_update")
6476 .
SetParam(
"rescale_grad", rescale_grad)
6477 .
SetParam(
"clip_gradient", clip_gradient)
6478 .
SetParam(
"lazy_update", lazy_update)
6531 double epsilon = 1e-08,
6542 .
SetParam(
"rescale_grad", rescale_grad)
6613 bool lazy_update =
true) {
6620 .
SetParam(
"rescale_grad", rescale_grad)
6621 .
SetParam(
"clip_gradient", clip_gradient)
6622 .
SetParam(
"lazy_update", lazy_update)
6699 .
SetParam(
"rescale_grad", rescale_grad)
6700 .
SetParam(
"clip_gradient", clip_gradient)
6701 .
SetParam(
"clip_weights", clip_weights)
6767 return Operator(
"rmspropalex_update")
6773 .
SetParam(
"rescale_grad", rescale_grad)
6774 .
SetParam(
"clip_gradient", clip_gradient)
6775 .
SetParam(
"clip_weights", clip_weights)
6839 .
SetParam(
"rescale_grad", rescale_grad)
6840 .
SetParam(
"clip_gradient", clip_gradient)
6923 bool squeeze_axis =
false) {
6925 .
SetParam(
"num_outputs", num_outputs)
6927 .
SetParam(
"squeeze_axis", squeeze_axis)
7017 static const char *GridGeneratorTransformTypeValues[] = {
7022 .
SetParam(
"transform_type", GridGeneratorTransformTypeValues[
int(transform_type)])
7023 .
SetParam(
"target_shape", target_shape)
7098 bool global_pool =
false,
7102 static const char *Pooling_v1PoolTypeValues[] = {
7107 static const char *Pooling_v1PoolingConventionValues[] = {
7113 .
SetParam(
"pool_type", Pooling_v1PoolTypeValues[
int(pool_type)])
7114 .
SetParam(
"global_pool", global_pool)
7115 .
SetParam(
"pooling_convention", Pooling_v1PoolingConventionValues[
int(pooling_convention)])
7207 uint32_t state_size,
7208 uint32_t num_layers,
7210 bool bidirectional =
false,
7212 bool state_outputs =
false,
7213 dmlc::optional<int> projection_size = dmlc::optional<int>(),
7214 dmlc::optional<double> lstm_state_clip_min = dmlc::optional<double>(),
7215 dmlc::optional<double> lstm_state_clip_max = dmlc::optional<double>(),
7216 bool lstm_state_clip_nan =
false) {
7217 static const char *RNNModeValues[] = {
7224 .
SetParam(
"state_size", state_size)
7225 .
SetParam(
"num_layers", num_layers)
7226 .
SetParam(
"mode", RNNModeValues[
int(mode)])
7227 .
SetParam(
"bidirectional", bidirectional)
7229 .
SetParam(
"state_outputs", state_outputs)
7230 .
SetParam(
"projection_size", projection_size)
7231 .
SetParam(
"lstm_state_clip_min", lstm_state_clip_min)
7232 .
SetParam(
"lstm_state_clip_max", lstm_state_clip_max)
7233 .
SetParam(
"lstm_state_clip_nan", lstm_state_clip_nan)
7235 .
SetInput(
"parameters", parameters)
7237 .
SetInput(
"state_cell", state_cell)
7303 uint32_t num_filter,
7307 uint32_t num_group = 1,
7308 uint64_t workspace = 1024,
7309 bool no_bias =
false,
7311 bool cudnn_off =
false,
7313 static const char *Convolution_v1CudnnTuneValues[] = {
7316 "limited_workspace",
7319 static const char *Convolution_v1LayoutValues[] = {
7328 .
SetParam(
"num_filter", num_filter)
7335 .
SetParam(
"cudnn_tune", Convolution_v1CudnnTuneValues[
int(cudnn_tune)])
7337 .
SetParam(
"layout", Convolution_v1LayoutValues[
int(layout)])
7365 const std::vector<Symbol>& data,
7369 bool center_crop =
false) {
7374 .
SetParam(
"center_crop", center_crop)
7376 .CreateSymbol(symbol_name);
7458 bool use_sequence_length =
false,
7461 .
SetParam(
"use_sequence_length", use_sequence_length)
7464 .
SetInput(
"sequence_length", sequence_length)
7497 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>()) {
7498 static const char *SpatialTransformerTransformTypeValues[] = {
7501 static const char *SpatialTransformerSamplerTypeValues[] = {
7504 return Operator(
"SpatialTransformer")
7505 .
SetParam(
"transform_type", SpatialTransformerTransformTypeValues[
int(transform_type)])
7506 .
SetParam(
"sampler_type", SpatialTransformerSamplerTypeValues[
int(sampler_type)])
7507 .
SetParam(
"target_shape", target_shape)
7622 bool multi_output =
false,
7623 bool use_ignore =
false,
7624 bool preserve_shape =
false,
7626 bool out_grad =
false,
7628 static const char *SoftmaxOutputNormalizationValues[] = {
7634 .
SetParam(
"grad_scale", grad_scale)
7635 .
SetParam(
"ignore_label", ignore_label)
7636 .
SetParam(
"multi_output", multi_output)
7637 .
SetParam(
"use_ignore", use_ignore)
7638 .
SetParam(
"preserve_shape", preserve_shape)
7639 .
SetParam(
"normalization", SoftmaxOutputNormalizationValues[
int(normalization)])
7641 .
SetParam(
"smooth_alpha", smooth_alpha)
7686 bool multi_output =
false,
7687 bool use_ignore =
false,
7688 bool preserve_shape =
false,
7690 bool out_grad =
false,
7692 static const char *SoftmaxNormalizationValues[] = {
7698 .
SetParam(
"grad_scale", grad_scale)
7699 .
SetParam(
"ignore_label", ignore_label)
7700 .
SetParam(
"multi_output", multi_output)
7701 .
SetParam(
"use_ignore", use_ignore)
7702 .
SetParam(
"preserve_shape", preserve_shape)
7703 .
SetParam(
"normalization", SoftmaxNormalizationValues[
int(normalization)])
7705 .
SetParam(
"smooth_alpha", smooth_alpha)
7794 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>()) {
7864 .
SetParam(
"pooled_size", pooled_size)
7865 .
SetParam(
"spatial_scale", spatial_scale)
7929 bool use_sequence_length =
false,
7932 .
SetParam(
"use_sequence_length", use_sequence_length)
7935 .
SetInput(
"sequence_length", sequence_length)
8013 static const char *L2NormalizationModeValues[] = {
8020 .
SetParam(
"mode", L2NormalizationModeValues[
int(mode)])
8074 static const char *MakeLossNormalizationValues[] = {
8080 .
SetParam(
"grad_scale", grad_scale)
8081 .
SetParam(
"valid_thresh", valid_thresh)
8082 .
SetParam(
"normalization", MakeLossNormalizationValues[
int(normalization)])
8106 mx_float regularization_coefficient = 1,
8107 bool use_linear =
false) {
8110 .
SetParam(
"regularization_coefficient", regularization_coefficient)
8111 .
SetParam(
"use_linear", use_linear)
8169 uint32_t kernel_size = 1,
8170 uint32_t max_displacement = 1,
8171 uint32_t stride1 = 1,
8172 uint32_t stride2 = 1,
8173 uint32_t pad_size = 0,
8174 bool is_multiply =
true) {
8176 .
SetParam(
"kernel_size", kernel_size)
8177 .
SetParam(
"max_displacement", max_displacement)
8181 .
SetParam(
"is_multiply", is_multiply)
8268 bool use_sequence_length =
false,
8272 .
SetParam(
"use_sequence_length", use_sequence_length)
8276 .
SetInput(
"sequence_length", sequence_length)
8291 return Operator(
"choose_element_0index")
8310 return Operator(
"fill_element_0index")
8377 const std::string& op_type) {
8437 return Operator(
"broadcast_maximum")
8468 return Operator(
"broadcast_minimum")
8588 bool keep_highest =
false) {
8592 .
SetParam(
"target_shape", target_shape)
8593 .
SetParam(
"keep_highest", keep_highest)
8801 dmlc::optional<int> end) {
8876 .
SetInput(
"shape_like", shape_like)
8958 dmlc::optional<int> axis = dmlc::optional<int>()) {
9102 dmlc::optional<Shape> axis = dmlc::optional<Shape>()) {
9152 .
SetParam(
"block_size", block_size)
9202 .
SetParam(
"block_size", block_size)
9315 dmlc::optional<int> axis = dmlc::optional<int>(),
9316 bool keepdims =
false) {
9355 dmlc::optional<int> axis = dmlc::optional<int>(),
9356 bool keepdims =
false) {
9448 dmlc::optional<int> axis = dmlc::optional<int>(-1),
9449 bool keepdims =
false,
9451 static const char *PickModeValues[] = {
9458 .
SetParam(
"mode", PickModeValues[
int(mode)])
9523 bool transpose_a =
false,
9524 bool transpose_b =
false,
9526 static const char *DotForwardStypeValues[] = {
9533 .
SetParam(
"transpose_a", transpose_a)
9534 .
SetParam(
"transpose_b", transpose_b)
9535 .
SetParam(
"forward_stype", DotForwardStypeValues[
int(forward_stype)])
9567 bool transpose_a =
false,
9568 bool transpose_b =
false,
9570 static const char *Batch_dotForwardStypeValues[] = {
9577 .
SetParam(
"transpose_a", transpose_a)
9578 .
SetParam(
"transpose_b", transpose_b)
9579 .
SetParam(
"forward_stype", Batch_dotForwardStypeValues[
int(forward_stype)])
9977 dmlc::optional<int> lhs_begin = dmlc::optional<int>(),
9978 dmlc::optional<int> lhs_end = dmlc::optional<int>(),
9979 dmlc::optional<int> rhs_begin = dmlc::optional<int>(),
9980 dmlc::optional<int> rhs_end = dmlc::optional<int>()) {
10029 static const char *CastDtypeValues[] = {
10039 .
SetParam(
"dtype", CastDtypeValues[
int(dtype)])
10679 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
10680 bool keepdims =
false,
10681 bool exclude =
false) {
10714 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
10715 bool keepdims =
false,
10716 bool exclude =
false) {
10749 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
10750 bool keepdims =
false,
10751 bool exclude =
false) {
10786 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
10787 bool keepdims =
false,
10788 bool exclude =
false) {
10823 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
10824 bool keepdims =
false,
10825 bool exclude =
false) {
10858 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
10859 bool keepdims =
false,
10860 bool exclude =
false) {
10893 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
10894 bool keepdims =
false,
10895 bool exclude =
false) {
11006 dmlc::optional<Shape> lhs_axes = dmlc::optional<Shape>(),
11007 dmlc::optional<Shape> rhs_axes = dmlc::optional<Shape>()) {
11060 dmlc::optional<Shape> axis = dmlc::optional<Shape>(),
11061 bool keepdims =
false) {
11113 dmlc::optional<int> axis = dmlc::optional<int>(-1),
11116 bool is_ascend =
false,
11118 static const char *TopkRetTypValues[] = {
11124 static const char *TopkDtypeValues[] = {
11134 .
SetParam(
"ret_typ", TopkRetTypValues[
int(ret_typ)])
11136 .
SetParam(
"dtype", TopkDtypeValues[
int(dtype)])
11173 dmlc::optional<int> axis = dmlc::optional<int>(-1),
11174 bool is_ascend =
true) {
11214 dmlc::optional<int> axis = dmlc::optional<int>(-1),
11215 bool is_ascend =
true,
11217 static const char *ArgsortDtypeValues[] = {
11227 .
SetParam(
"dtype", ArgsortDtypeValues[
int(dtype)])
11394 bool sparse_grad =
false) {
11395 static const char *EmbeddingDtypeValues[] = {
11406 .
SetParam(
"output_dim", output_dim)
11407 .
SetParam(
"dtype", EmbeddingDtypeValues[
int(dtype)])
11408 .
SetParam(
"sparse_grad", sparse_grad)
11476 static const char *TakeModeValues[] = {
11483 .
SetParam(
"mode", TakeModeValues[
int(mode)])
11569 double on_value = 1,
11570 double off_value = 0,
11572 static const char *One_hotDtypeValues[] = {
11585 .
SetParam(
"dtype", One_hotDtypeValues[
int(dtype)])
11711 return Operator(
"broadcast_equal")
11740 return Operator(
"broadcast_not_equal")
11769 return Operator(
"broadcast_greater")
11798 return Operator(
"broadcast_greater_equal")
11827 return Operator(
"broadcast_lesser")
11856 return Operator(
"broadcast_lesser_equal")
11885 return Operator(
"broadcast_logical_and")
11914 return Operator(
"broadcast_logical_or")
11943 return Operator(
"broadcast_logical_xor")
12147 static const char *Cast_storageStypeValues[] = {
12153 .
SetParam(
"stype", Cast_storageStypeValues[
int(stype)])
12556 bool global_pool =
false,
12557 bool cudnn_off =
false,
12561 dmlc::optional<int> p_value = dmlc::optional<int>(),
12562 dmlc::optional<bool> count_include_pad = dmlc::optional<bool>()) {
12563 static const char *PoolingPoolTypeValues[] = {
12569 static const char *PoolingPoolingConventionValues[] = {
12576 .
SetParam(
"pool_type", PoolingPoolTypeValues[
int(pool_type)])
12577 .
SetParam(
"global_pool", global_pool)
12579 .
SetParam(
"pooling_convention", PoolingPoolingConventionValues[
int(pooling_convention)])
12583 .
SetParam(
"count_include_pad", count_include_pad)
12621 dmlc::optional<double> temperature = dmlc::optional<double>()) {
12624 .
SetParam(
"temperature", temperature)
12663 dmlc::optional<double> temperature = dmlc::optional<double>()) {
12666 .
SetParam(
"temperature", temperature)
12695 dmlc::optional<double> temperature = dmlc::optional<double>()) {
12698 .
SetParam(
"temperature", temperature)
12735 uint32_t num_filter,
12741 uint32_t num_group = 1,
12742 uint64_t workspace = 512,
12743 bool no_bias =
true,
12745 bool cudnn_off =
false,
12747 static const char *DeconvolutionCudnnTuneValues[] = {
12750 "limited_workspace",
12753 static const char *DeconvolutionLayoutValues[] = {
12763 .
SetParam(
"num_filter", num_filter)
12768 .
SetParam(
"target_shape", target_shape)
12772 .
SetParam(
"cudnn_tune", DeconvolutionCudnnTuneValues[
int(cudnn_tune)])
12774 .
SetParam(
"layout", DeconvolutionLayoutValues[
int(layout)])
12801 static const char *ActivationActTypeValues[] = {
12809 .
SetParam(
"act_type", ActivationActTypeValues[
int(act_type)])
12886 double eps = 0.001,
12888 bool fix_gamma =
true,
12889 bool use_global_stats =
false,
12890 bool output_mean_var =
false,
12892 bool cudnn_off =
false) {
12897 .
SetParam(
"use_global_stats", use_global_stats)
12898 .
SetParam(
"output_mean_var", output_mean_var)
12904 .
SetInput(
"moving_mean", moving_mean)
12905 .
SetInput(
"moving_var", moving_var)
12978 bool use_data_lengths =
false,
12979 bool use_label_lengths =
false,
12981 static const char *CTCLossBlankLabelValues[] = {
12986 .
SetParam(
"use_data_lengths", use_data_lengths)
12987 .
SetParam(
"use_label_lengths", use_label_lengths)
12988 .
SetParam(
"blank_label", CTCLossBlankLabelValues[
int(blank_label)])
12991 .
SetInput(
"data_lengths", data_lengths)
12992 .
SetInput(
"label_lengths", label_lengths)
13096 uint32_t num_filter,
13100 uint32_t num_group = 1,
13101 uint64_t workspace = 1024,
13102 bool no_bias =
false,
13104 bool cudnn_off =
false,
13106 static const char *ConvolutionCudnnTuneValues[] = {
13109 "limited_workspace",
13112 static const char *ConvolutionLayoutValues[] = {
13122 .
SetParam(
"num_filter", num_filter)
13129 .
SetParam(
"cudnn_tune", ConvolutionCudnnTuneValues[
int(cudnn_tune)])
13131 .
SetParam(
"layout", ConvolutionLayoutValues[
int(layout)])
13156 int num_filter = 0,
13158 uint64_t workspace = 512) {
13159 static const char *UpSamplingSampleTypeValues[] = {
13163 static const char *UpSamplingMultiInputModeValues[] = {
13169 .
SetParam(
"sample_type", UpSamplingSampleTypeValues[
int(sample_type)])
13171 .
SetParam(
"num_filter", num_filter)
13172 .
SetParam(
"multi_input_mode", UpSamplingMultiInputModeValues[
int(multi_input_mode)])
13275 bool output_mean_var =
false) {
13279 .
SetParam(
"output_mean_var", output_mean_var)
13369 static const char *DropoutModeValues[] = {
13375 .
SetParam(
"mode", DropoutModeValues[
int(mode)])
13415 static const char *SoftmaxActivationModeValues[] = {
13419 return Operator(
"SoftmaxActivation")
13420 .
SetParam(
"mode", SoftmaxActivationModeValues[
int(mode)])
13471 bool no_bias =
false,
13472 bool flatten =
true) {
13474 .
SetParam(
"num_hidden", num_hidden)
13581 double constant_value = 0) {
13582 static const char *PadModeValues[] = {
13588 .
SetParam(
"mode", PadModeValues[
int(mode)])
13590 .
SetParam(
"constant_value", constant_value)
13630 static const char *LeakyReLUActTypeValues[] = {
13638 .
SetParam(
"act_type", LeakyReLUActTypeValues[
int(act_type)])
13640 .
SetParam(
"lower_bound", lower_bound)
13641 .
SetParam(
"upper_bound", upper_bound)
13676 uint32_t dim2 = 0) {
13748 bool fix_gamma =
true,
13749 bool use_global_stats =
false,
13750 bool output_mean_var =
false) {
13755 .
SetParam(
"use_global_stats", use_global_stats)
13756 .
SetParam(
"output_mean_var", output_mean_var)
13801 return Operator(
"softmax_cross_entropy")
13838 return Operator(
"LinearRegressionOutput")
13839 .
SetParam(
"grad_scale", grad_scale)
13877 return Operator(
"MAERegressionOutput")
13878 .
SetParam(
"grad_scale", grad_scale)
13922 return Operator(
"LogisticRegressionOutput")
13923 .
SetParam(
"grad_scale", grad_scale)
13941 return Operator(
"IdentityAttachKLSparseReg")
13942 .
SetParam(
"sparseness_target", sparseness_target)
13985 .
SetParam(
"rescale_grad", rescale_grad)
13986 .
SetParam(
"clip_gradient", clip_gradient)
14038 .
SetParam(
"rescale_grad", rescale_grad)
14039 .
SetParam(
"clip_gradient", clip_gradient)
14080 bool lazy_update =
true) {
14084 .
SetParam(
"rescale_grad", rescale_grad)
14085 .
SetParam(
"clip_gradient", clip_gradient)
14086 .
SetParam(
"lazy_update", lazy_update)
14143 bool lazy_update =
true) {
14148 .
SetParam(
"rescale_grad", rescale_grad)
14149 .
SetParam(
"clip_gradient", clip_gradient)
14150 .
SetParam(
"lazy_update", lazy_update)
14178 bool lazy_update =
true) {
14182 .
SetParam(
"rescale_grad", rescale_grad)
14183 .
SetParam(
"clip_gradient", clip_gradient)
14184 .
SetParam(
"lazy_update", lazy_update)
14216 bool lazy_update =
true) {
14217 return Operator(
"mp_sgd_mom_update")
14221 .
SetParam(
"rescale_grad", rescale_grad)
14222 .
SetParam(
"clip_gradient", clip_gradient)
14223 .
SetParam(
"lazy_update", lazy_update)
14274 double epsilon = 1e-08,
14285 .
SetParam(
"rescale_grad", rescale_grad)
14354 bool lazy_update =
true) {
14361 .
SetParam(
"rescale_grad", rescale_grad)
14362 .
SetParam(
"clip_gradient", clip_gradient)
14363 .
SetParam(
"lazy_update", lazy_update)
14438 .
SetParam(
"rescale_grad", rescale_grad)
14439 .
SetParam(
"clip_gradient", clip_gradient)
14440 .
SetParam(
"clip_weights", clip_weights)
14504 return Operator(
"rmspropalex_update")
14510 .
SetParam(
"rescale_grad", rescale_grad)
14511 .
SetParam(
"clip_gradient", clip_gradient)
14512 .
SetParam(
"clip_weights", clip_weights)
14574 .
SetParam(
"rescale_grad", rescale_grad)
14575 .
SetParam(
"clip_gradient", clip_gradient)
14656 bool squeeze_axis =
false) {
14658 .
SetParam(
"num_outputs", num_outputs)
14660 .
SetParam(
"squeeze_axis", squeeze_axis)
14738 static const char *GridGeneratorTransformTypeValues[] = {
14743 .
SetParam(
"transform_type", GridGeneratorTransformTypeValues[
int(transform_type)])
14744 .
SetParam(
"target_shape", target_shape)
14802 bool global_pool =
false,
14806 static const char *Pooling_v1PoolTypeValues[] = {
14811 static const char *Pooling_v1PoolingConventionValues[] = {
14817 .
SetParam(
"pool_type", Pooling_v1PoolTypeValues[
int(pool_type)])
14818 .
SetParam(
"global_pool", global_pool)
14819 .
SetParam(
"pooling_convention", Pooling_v1PoolingConventionValues[
int(pooling_convention)])
14900 uint32_t state_size,
14901 uint32_t num_layers,
14903 bool bidirectional =
false,
14905 bool state_outputs =
false,
14906 dmlc::optional<int> projection_size = dmlc::optional<int>(),
14907 dmlc::optional<double> lstm_state_clip_min = dmlc::optional<double>(),
14908 dmlc::optional<double> lstm_state_clip_max = dmlc::optional<double>(),
14909 bool lstm_state_clip_nan =
false) {
14910 static const char *RNNModeValues[] = {
14917 .
SetParam(
"state_size", state_size)
14918 .
SetParam(
"num_layers", num_layers)
14919 .
SetParam(
"mode", RNNModeValues[
int(mode)])
14920 .
SetParam(
"bidirectional", bidirectional)
14922 .
SetParam(
"state_outputs", state_outputs)
14923 .
SetParam(
"projection_size", projection_size)
14924 .
SetParam(
"lstm_state_clip_min", lstm_state_clip_min)
14925 .
SetParam(
"lstm_state_clip_max", lstm_state_clip_max)
14926 .
SetParam(
"lstm_state_clip_nan", lstm_state_clip_nan)
14928 .
SetInput(
"parameters", parameters)
14930 .
SetInput(
"state_cell", state_cell)
14967 uint32_t num_filter,
14971 uint32_t num_group = 1,
14972 uint64_t workspace = 1024,
14973 bool no_bias =
false,
14975 bool cudnn_off =
false,
14977 static const char *Convolution_v1CudnnTuneValues[] = {
14980 "limited_workspace",
14983 static const char *Convolution_v1LayoutValues[] = {
14992 .
SetParam(
"num_filter", num_filter)
14999 .
SetParam(
"cudnn_tune", Convolution_v1CudnnTuneValues[
int(cudnn_tune)])
15001 .
SetParam(
"layout", Convolution_v1LayoutValues[
int(layout)])
15031 bool center_crop =
false) {
15036 .
SetParam(
"center_crop", center_crop)
15118 bool use_sequence_length =
false,
15120 return Operator(
"SequenceReverse")
15121 .
SetParam(
"use_sequence_length", use_sequence_length)
15124 .
SetInput(
"sequence_length", sequence_length)
15143 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>()) {
15144 static const char *SpatialTransformerTransformTypeValues[] = {
15147 static const char *SpatialTransformerSamplerTypeValues[] = {
15150 return Operator(
"SpatialTransformer")
15151 .
SetParam(
"transform_type", SpatialTransformerTransformTypeValues[
int(transform_type)])
15152 .
SetParam(
"sampler_type", SpatialTransformerSamplerTypeValues[
int(sampler_type)])
15153 .
SetParam(
"target_shape", target_shape)
15258 bool multi_output =
false,
15259 bool use_ignore =
false,
15260 bool preserve_shape =
false,
15262 bool out_grad =
false,
15264 static const char *SoftmaxOutputNormalizationValues[] = {
15270 .
SetParam(
"grad_scale", grad_scale)
15271 .
SetParam(
"ignore_label", ignore_label)
15272 .
SetParam(
"multi_output", multi_output)
15273 .
SetParam(
"use_ignore", use_ignore)
15274 .
SetParam(
"preserve_shape", preserve_shape)
15275 .
SetParam(
"normalization", SoftmaxOutputNormalizationValues[
int(normalization)])
15277 .
SetParam(
"smooth_alpha", smooth_alpha)
15312 bool multi_output =
false,
15313 bool use_ignore =
false,
15314 bool preserve_shape =
false,
15316 bool out_grad =
false,
15318 static const char *SoftmaxNormalizationValues[] = {
15324 .
SetParam(
"grad_scale", grad_scale)
15325 .
SetParam(
"ignore_label", ignore_label)
15326 .
SetParam(
"multi_output", multi_output)
15327 .
SetParam(
"use_ignore", use_ignore)
15328 .
SetParam(
"preserve_shape", preserve_shape)
15329 .
SetParam(
"normalization", SoftmaxNormalizationValues[
int(normalization)])
15331 .
SetParam(
"smooth_alpha", smooth_alpha)
15418 dmlc::optional<bool> cudnn_off = dmlc::optional<bool>()) {
15419 return Operator(
"BilinearSampler")
15486 .
SetParam(
"pooled_size", pooled_size)
15487 .
SetParam(
"spatial_scale", spatial_scale)
15549 bool use_sequence_length =
false,
15552 .
SetParam(
"use_sequence_length", use_sequence_length)
15555 .
SetInput(
"sequence_length", sequence_length)
15623 static const char *L2NormalizationModeValues[] = {
15628 return Operator(
"L2Normalization")
15630 .
SetParam(
"mode", L2NormalizationModeValues[
int(mode)])
15672 static const char *MakeLossNormalizationValues[] = {
15678 .
SetParam(
"grad_scale", grad_scale)
15679 .
SetParam(
"valid_thresh", valid_thresh)
15680 .
SetParam(
"normalization", MakeLossNormalizationValues[
int(normalization)])
15702 mx_float regularization_coefficient = 1,
15703 bool use_linear =
false) {
15706 .
SetParam(
"regularization_coefficient", regularization_coefficient)
15707 .
SetParam(
"use_linear", use_linear)
15763 uint32_t kernel_size = 1,
15764 uint32_t max_displacement = 1,
15765 uint32_t stride1 = 1,
15766 uint32_t stride2 = 1,
15767 uint32_t pad_size = 0,
15768 bool is_multiply =
true) {
15770 .
SetParam(
"kernel_size", kernel_size)
15771 .
SetParam(
"max_displacement", max_displacement)
15775 .
SetParam(
"is_multiply", is_multiply)
15860 bool use_sequence_length =
false,
15864 .
SetParam(
"use_sequence_length", use_sequence_length)
15868 .
SetInput(
"sequence_length", sequence_length)
15881 return Operator(
"choose_element_0index")
15898 return Operator(
"fill_element_0index")
15907 #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)
Definition: op.h:5253
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 >())
Definition: op.h:4636
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)
Definition: op.h:6461
Symbol fix(const std::string &symbol_name, Symbol data)
Definition: op.h:2147
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)
Definition: op.h:7364
Symbol broadcast_mul(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:1489
Symbol arcsin(const std::string &symbol_name, Symbol data)
Definition: op.h:4297
Symbol FullyConnected(const std::string &symbol_name, Symbol data, Symbol weight, Symbol bias, int num_hidden, bool no_bias=false, bool flatten=true)
Definition: op.h:5672
Symbol arccosh(const std::string &symbol_name, Symbol data)
Definition: op.h:4520
Symbol arctan(const std::string &symbol_name, Symbol data)
Definition: op.h:4350
Symbol SwapAxis(const std::string &symbol_name, Symbol data, uint32_t dim1=0, uint32_t dim2=0)
Definition: op.h:5904
Symbol cast_storage(const std::string &symbol_name, Symbol data, Cast_storageStype stype)
Definition: op.h:4181
Symbol add_n(const std::string &symbol_name, const std::vector< Symbol > &args)
Definition: op.h:1030
Symbol log1p(const std::string &symbol_name, Symbol data)
Definition: op.h:2423
SoftmaxActivationMode
Definition: op.h:5578
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 >())
Definition: op.h:7491
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)
Definition: op.h:3161
Symbol slice(const std::string &symbol_name, Symbol data, Shape begin, Shape end, Shape step=Shape())
Definition: op.h:481
Symbol diag(const std::string &symbol_name, Symbol data, int k=0, int axis1=0, int axis2=1)
Definition: op.h:4034
Symbol exp(const std::string &symbol_name, Symbol data)
Definition: op.h:2334
Symbol transpose(const std::string &symbol_name, Symbol data, Shape axes=Shape())
Definition: op.h:393
Symbol RNN(const std::string &symbol_name, Symbol data, Symbol parameters, Symbol state, Symbol state_cell, 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)
Definition: op.h:7202
Symbol clip(const std::string &symbol_name, Symbol data, mx_float a_min, mx_float a_max)
Definition: op.h:645
Symbol elemwise_div(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3275
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)
Definition: op.h:3359
Symbol ROIPooling(const std::string &symbol_name, Symbol data, Symbol rois, Shape pooled_size, mx_float spatial_scale)
Definition: op.h:7858
Symbol broadcast_div(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:1524
Convolution_v1Layout
Definition: op.h:7260
Symbol argmin(const std::string &symbol_name, Symbol data, dmlc::optional< int > axis=dmlc::optional< int >(), bool keepdims=false)
Definition: op.h:1110
Symbol dot(const std::string &symbol_name, Symbol lhs, Symbol rhs, bool transpose_a=false, bool transpose_b=false, DotForwardStype forward_stype=DotForwardStype::kNone)
Definition: op.h:1303
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)
Definition: op.h:3045
Symbol SequenceReverse(const std::string &symbol_name, Symbol data, Symbol sequence_length, bool use_sequence_length=false, int axis=0)
Definition: op.h:7455
Symbol broadcast_lesser(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3837
Symbol fill_element_0index(const std::string &symbol_name, Symbol lhs, Symbol mhs, Symbol rhs)
Definition: op.h:8306
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)
Definition: op.h:7298
Symbol broadcast_not_equal(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3744
TakeMode
Definition: op.h:3389
Symbol SequenceLast(const std::string &symbol_name, Symbol data, Symbol sequence_length, bool use_sequence_length=false, int axis=0)
Definition: op.h:7926
Symbol ftrl_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol z, Symbol n, mx_float lr, mx_float lamda1=0.01, mx_float beta=1, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1)
Definition: op.h:6823
Symbol reciprocal(const std::string &symbol_name, Symbol data)
Definition: op.h:1919
TopkRetTyp
Definition: op.h:2985
namespace of mxnet
Definition: base.h:118
Symbol reshape_like(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:1770
Pooling_v1PoolingConvention
Definition: op.h:7038
Symbol broadcast_lesser_equal(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3868
Operator & SetInput(const std::string &name, Symbol symbol)
add an input symbol
Symbol InstanceNorm(const std::string &symbol_name, Symbol data, Symbol gamma, Symbol beta, mx_float eps=0.001)
Definition: op.h:6982
Symbol sign(const std::string &symbol_name, Symbol data)
Definition: op.h:1973
GridGeneratorTransformType
Definition: op.h:6998
Cast_storageStype
Definition: op.h:4130
Symbol log_softmax(const std::string &symbol_name, Symbol data, int axis=-1, dmlc::optional< double > temperature=dmlc::optional< double >())
Definition: op.h:4782
dynamic shape class that can hold shape of arbirary dimension
Definition: shape.h:43
Symbol ones_like(const std::string &symbol_name, Symbol data)
Definition: op.h:1001
RNNMode
Definition: op.h:7124
PadMode
Definition: op.h:5692
Symbol smooth_l1(const std::string &symbol_name, Symbol data, mx_float scalar)
Definition: op.h:4119
Symbol where(const std::string &symbol_name, Symbol condition, Symbol x, Symbol y)
Definition: op.h:4082
Symbol space_to_depth(const std::string &symbol_name, Symbol data, int block_size)
Definition: op.h:945
Symbol expm1(const std::string &symbol_name, Symbol data)
Definition: op.h:2448
Symbol elemwise_add(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3200
PoolingPoolType
Definition: op.h:4553
Symbol relu(const std::string &symbol_name, Symbol data)
Definition: op.h:1583
Symbol reverse(const std::string &symbol_name, Symbol data, Shape axis)
Definition: op.h:778
Symbol rsqrt(const std::string &symbol_name, Symbol data)
Definition: op.h:2233
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)
Definition: op.h:6423
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)
Definition: op.h:1360
SpatialTransformerTransformType
Definition: op.h:7470
ActivationActType
Definition: op.h:4895
Symbol sqrt(const std::string &symbol_name, Symbol data)
Definition: op.h:2207
Symbol Softmax(const std::string &symbol_name, Symbol data, mx_float grad_scale=1, mx_float ignore_label=-1, bool multi_output=false, bool use_ignore=false, bool preserve_shape=false, SoftmaxNormalization normalization=SoftmaxNormalization::kNull, bool out_grad=false, mx_float smooth_alpha=0)
Definition: op.h:7682
Symbol rint(const std::string &symbol_name, Symbol data)
Definition: op.h:2031
Symbol IdentityAttachKLSparseReg(const std::string &symbol_name, Symbol data, mx_float sparseness_target=0.1, mx_float penalty=0.001, mx_float momentum=0.9)
Definition: op.h:6179
Symbol sinh(const std::string &symbol_name, Symbol data)
Definition: op.h:4428
Symbol scatter_nd(const std::string &symbol_name, Symbol data, Symbol indices, Shape shape)
Definition: op.h:3680
Symbol broadcast_greater_equal(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3806
Symbol LRN(const std::string &symbol_name, Symbol data, uint32_t nsize, mx_float alpha=0.0001, mx_float beta=0.75, mx_float knorm=2)
Definition: op.h:5496
Symbol LayerNorm(const std::string &symbol_name, Symbol data, Symbol gamma, Symbol beta, int axis=-1, mx_float eps=1e-05, bool output_mean_var=false)
Definition: op.h:5452
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)
Definition: op.h:5330
Symbol arcsinh(const std::string &symbol_name, Symbol data)
Definition: op.h:4500
Symbol MAERegressionOutput(const std::string &symbol_name, Symbol data, Symbol label, mx_float grad_scale=1)
Definition: op.h:6112
Symbol SliceChannel(const std::string &symbol_name, Symbol data, int num_outputs, int axis=1, bool squeeze_axis=false)
Definition: op.h:6919
PoolingPoolingConvention
Definition: op.h:4562
Symbol broadcast_minimum(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:180
ArgsortDtype
Definition: op.h:3121
Symbol broadcast_maximum(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:147
Symbol Cast(const std::string &symbol_name, Symbol data, CastDtype dtype)
Definition: op.h:1864
Symbol erf(const std::string &symbol_name, Symbol data)
Definition: op.h:2284
DeconvolutionLayout
Definition: op.h:4804
Symbol trunc(const std::string &symbol_name, Symbol data)
Definition: op.h:2119
Pooling_v1PoolType
Definition: op.h:7030
Symbol round(const std::string &symbol_name, Symbol data)
Definition: op.h:2000
Symbol adam_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol mean, Symbol var, mx_float lr, mx_float beta1=0.9, mx_float beta2=0.999, mx_float epsilon=1e-08, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, bool lazy_update=true)
Definition: op.h:6601
Symbol Dropout(const std::string &symbol_name, Symbol data, mx_float p=0.5, DropoutMode mode=DropoutMode::kTraining, Shape axes=Shape())
Definition: op.h:5558
Symbol squeeze(const std::string &symbol_name, const std::vector< Symbol > &data, dmlc::optional< Shape > axis=dmlc::optional< Shape >())
Definition: op.h:843
TopkDtype
Definition: op.h:2994
Symbol broadcast_logical_or(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3930
Symbol khatri_rao(const std::string &symbol_name, const std::vector< Symbol > &args)
Definition: op.h:62
Symbol cos(const std::string &symbol_name, Symbol data)
Definition: op.h:4240
Symbol L2Normalization(const std::string &symbol_name, Symbol data, mx_float eps=1e-10, L2NormalizationMode mode=L2NormalizationMode::kInstance)
Definition: op.h:8009
Symbol max(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Definition: op.h:2756
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)
Definition: op.h:8166
CTCLossBlankLabel
Definition: op.h:5041
Symbol zeros_like(const std::string &symbol_name, Symbol data)
Definition: op.h:977
EmbeddingDtype
Definition: op.h:3286
Symbol broadcast_mod(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:1555
Symbol cbrt(const std::string &symbol_name, Symbol data)
Definition: op.h:2263
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 >())
Definition: op.h:2911
operator helper functions
Symbol broadcast_logical_and(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3899
Symbol logical_not(const std::string &symbol_name, Symbol data)
Definition: op.h:2502
Symbol tanh(const std::string &symbol_name, Symbol data)
Definition: op.h:4476
Symbol broadcast_to(const std::string &symbol_name, Symbol data, Shape shape=Shape())
Definition: op.h:2874
Symbol elemwise_sub(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3228
Symbol BilinearSampler(const std::string &symbol_name, Symbol data, Symbol grid, dmlc::optional< bool > cudnn_off=dmlc::optional< bool >())
Definition: op.h:7791
DropoutMode
Definition: op.h:5513
Symbol norm(const std::string &symbol_name, Symbol data, int ord=2, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false)
Definition: op.h:2967
Symbol MakeLoss(const std::string &symbol_name, Symbol data, mx_float grad_scale=1, mx_float valid_thresh=0, MakeLossNormalization normalization=MakeLossNormalization::kNull)
Definition: op.h:8069
Symbol log(const std::string &symbol_name, Symbol data)
Definition: op.h:2355
Symbol broadcast_logical_xor(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3961
Symbol sigmoid(const std::string &symbol_name, Symbol data)
Definition: op.h:1605
CastDtype
Definition: op.h:1835
DotForwardStype
Definition: op.h:1238
ConvolutionLayout
Definition: op.h:5147
Symbol LogisticRegressionOutput(const std::string &symbol_name, Symbol data, Symbol label, mx_float grad_scale=1)
Definition: op.h:6159
Symbol gamma(const std::string &symbol_name, Symbol data)
Definition: op.h:2466
Symbol sin(const std::string &symbol_name, Symbol data)
Definition: op.h:4216
UpSamplingMultiInputMode
Definition: op.h:5310
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)
Definition: op.h:5112
Symbol elemwise_mul(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3255
Symbol softmax(const std::string &symbol_name, Symbol data, int axis=-1, dmlc::optional< double > temperature=dmlc::optional< double >())
Definition: op.h:4704
Batch_dotForwardStype
Definition: op.h:1328
SpatialTransformerSamplerType
Definition: op.h:7476
Symbol Pad(const std::string &symbol_name, Symbol data, PadMode mode, Shape pad_width, double constant_value=0)
Definition: op.h:5794
Symbol square(const std::string &symbol_name, Symbol data)
Definition: op.h:2177
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.334)
Definition: op.h:5852
One_hotDtype
Definition: op.h:3511
Symbol nansum(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Definition: op.h:2680
UpSamplingSampleType
Definition: op.h:5302
Symbol rmsprop_update(const std::string &symbol_name, Symbol weight, Symbol grad, Symbol n, mx_float lr, mx_float gamma1=0.95, mx_float epsilon=1e-08, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, mx_float clip_weights=-1)
Definition: op.h:6683
Symbol make_loss(const std::string &symbol_name, Symbol data)
Definition: op.h:1729
Symbol SoftmaxActivation(const std::string &symbol_name, Symbol data, SoftmaxActivationMode mode=SoftmaxActivationMode::kInstance)
Definition: op.h:5616
Symbol broadcast_equal(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3713
Symbol nanprod(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Definition: op.h:2719
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)
Definition: op.h:4842
Symbol broadcast_add(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:1413
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)
Definition: op.h:4268
Convolution_v1CudnnTune
Definition: op.h:7250
Symbol repeat(const std::string &symbol_name, Symbol data, int repeats, dmlc::optional< int > axis=dmlc::optional< int >())
Definition: op.h:690
Symbol slice_axis(const std::string &symbol_name, Symbol data, int axis, int begin, dmlc::optional< int > end)
Definition: op.h:526
Symbol expand_dims(const std::string &symbol_name, Symbol data, int axis)
Definition: op.h:417
Symbol arctanh(const std::string &symbol_name, Symbol data)
Definition: op.h:4544
Symbol softmax_cross_entropy(const std::string &symbol_name, Symbol data, Symbol label)
Definition: op.h:6033
Symbol broadcast_axis(const std::string &symbol_name, Symbol data, Shape axis=Shape(), Shape size=Shape())
Definition: op.h:2835
Symbol abs(const std::string &symbol_name, Symbol data)
Definition: op.h:1946
Symbol cosh(const std::string &symbol_name, Symbol data)
Definition: op.h:4450
Symbol sort(const std::string &symbol_name, Symbol data, dmlc::optional< int > axis=dmlc::optional< int >(-1), bool is_ascend=true)
Definition: op.h:3107
Symbol gather_nd(const std::string &symbol_name, Symbol data, Symbol indices)
Definition: op.h:3620
Symbol slice_like(const std::string &symbol_name, Symbol data, Symbol shape_like, Shape axes=Shape())
Definition: op.h:600
Symbol Custom(const std::string &symbol_name, const std::vector< Symbol > &data, const std::string &op_type)
Definition: op.h:84
Symbol softmin(const std::string &symbol_name, Symbol data, int axis=-1, dmlc::optional< double > temperature=dmlc::optional< double >())
Definition: op.h:4748
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())
Definition: op.h:7094
Symbol broadcast_hypot(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:219
Symbol BatchNorm_v1(const std::string &symbol_name, Symbol data, Symbol gamma, Symbol beta, mx_float eps=0.001, mx_float momentum=0.9, bool fix_gamma=true, bool use_global_stats=false, bool output_mean_var=false)
Definition: op.h:5975
Symbol Activation(const std::string &symbol_name, Symbol data, ActivationActType act_type)
Definition: op.h:4922
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)
Definition: op.h:8102
Symbol radians(const std::string &symbol_name, Symbol data)
Definition: op.h:4402
Symbol Concat(const std::string &symbol_name, const std::vector< Symbol > &data, int num_args, int dim=1)
Definition: op.h:5403
L2NormalizationMode
Definition: op.h:7941
Symbol SequenceMask(const std::string &symbol_name, Symbol data, Symbol sequence_length, bool use_sequence_length=false, mx_float value=0, int axis=0)
Definition: op.h:8265
Symbol stack(const std::string &symbol_name, const std::vector< Symbol > &data, int num_args, int axis=0)
Definition: op.h:810
Symbol floor(const std::string &symbol_name, Symbol data)
Definition: op.h:2089
Symbol broadcast_sub(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:1454
Symbol take(const std::string &symbol_name, Symbol a, Symbol indices, int axis=0, TakeMode mode=TakeMode::kClip)
Definition: op.h:3454
Symbol ceil(const std::string &symbol_name, Symbol data)
Definition: op.h:2060
Symbol gammaln(const std::string &symbol_name, Symbol data)
Definition: op.h:2484
Symbol tile(const std::string &symbol_name, Symbol data, Shape reps)
Definition: op.h:746
Symbol min(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Definition: op.h:2793
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)
Definition: op.h:6271
Symbol depth_to_space(const std::string &symbol_name, Symbol data, int block_size)
Definition: op.h:893
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.95, mx_float gamma2=0.9, mx_float epsilon=1e-08, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_gradient=-1, mx_float clip_weights=-1)
Definition: op.h:6753
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.6, mx_float beta2=0.999, double epsilon=1e-08, mx_float wd=0, mx_float rescale_grad=1, mx_float clip_grad=-1)
Definition: op.h:6521
SoftmaxNormalization
Definition: op.h:7649
DeconvolutionCudnnTune
Definition: op.h:4795
ConvolutionCudnnTune
Definition: op.h:5137
Symbol prod(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Definition: op.h:2641
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)
Definition: op.h:1215
Symbol broadcast_greater(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:3775
Symbol BatchNorm(const std::string &symbol_name, Symbol data, Symbol gamma, Symbol beta, Symbol moving_mean, Symbol moving_var, double eps=0.001, mx_float momentum=0.9, bool fix_gamma=true, bool use_global_stats=false, bool output_mean_var=false, int axis=1, bool cudnn_off=false)
Definition: op.h:5006
Symbol rcbrt(const std::string &symbol_name, Symbol data)
Definition: op.h:2308
PickMode
Definition: op.h:1154
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)
Definition: op.h:6220
Symbol broadcast_power(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:114
SoftmaxOutputNormalization
Definition: op.h:7516
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)
Definition: op.h:7617
Symbol Flatten(const std::string &symbol_name, Symbol data)
Definition: op.h:350
Symbol BlockGrad(const std::string &symbol_name, Symbol data)
Definition: op.h:1693
LeakyReLUActType
Definition: op.h:5814
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)
Definition: op.h:6385
Symbol arccos(const std::string &symbol_name, Symbol data)
Definition: op.h:4322
Symbol hard_sigmoid(const std::string &symbol_name, Symbol data, mx_float alpha=0.2, mx_float beta=0.5)
Definition: op.h:1627
Symbol argmax_channel(const std::string &symbol_name, Symbol data)
Definition: op.h:1143
Symbol batch_take(const std::string &symbol_name, Symbol a, Symbol indices)
Definition: op.h:3500
Symbol mean(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Definition: op.h:2604
Symbol LinearRegressionOutput(const std::string &symbol_name, Symbol data, Symbol label, mx_float grad_scale=1)
Definition: op.h:6071
Symbol softsign(const std::string &symbol_name, Symbol data)
Definition: op.h:1653
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)
Definition: op.h:6322
Symbol choose_element_0index(const std::string &symbol_name, Symbol lhs, Symbol rhs)
Definition: op.h:8288
Symbol Reshape(const std::string &symbol_name, Symbol data, Shape shape=Shape(), bool reverse=false, Shape target_shape=Shape(), bool keep_highest=false)
Definition: op.h:302
Symbol degrees(const std::string &symbol_name, Symbol data)
Definition: op.h:4376
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 >())
Definition: op.h:1797
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)
Definition: op.h:3565
Symbol negative(const std::string &symbol_name, Symbol data)
Definition: op.h:1896
Symbol sum(const std::string &symbol_name, Symbol data, dmlc::optional< Shape > axis=dmlc::optional< Shape >(), bool keepdims=false, bool exclude=false)
Definition: op.h:2567
Symbol GridGenerator(const std::string &symbol_name, Symbol data, GridGeneratorTransformType transform_type, Shape target_shape=Shape(0, 0))
Definition: op.h:7013
Symbol size_array(const std::string &symbol_name, Symbol data)
Definition: op.h:1826
Symbol argmax(const std::string &symbol_name, Symbol data, dmlc::optional< int > axis=dmlc::optional< int >(), bool keepdims=false)
Definition: op.h:1068
Operator interface.
Definition: operator.h:43
Symbol interface.
Definition: symbol.h:72
MakeLossNormalization
Definition: op.h:8029
Symbol log10(const std::string &symbol_name, Symbol data)
Definition: op.h:2376
Symbol log2(const std::string &symbol_name, Symbol data)
Definition: op.h:2397