|
- {
- "nn.Dropout": {
- "ms_api": [
- "nn.Dropout",
- {
- "keep_prob": 0.5,
- "seed0": 0,
- "seed1": 0,
- "dtype": "mstype.float32"
- }
- ],
- "pt_api": [
- "nn.Dropout",
- {
- "p": 0.5,
- "inplace": false
- }
- ],
- "ms2pt_mapping": {},
- "gen_explicit_map": "nn_dropout_gen_explicit_map"
- },
- "nn.AvgPool2d": {
- "ms_api": [
- "nn.AvgPool2d",
- {
- "kernel_size": 1,
- "stride": 1,
- "pad_mode": "valid"
- }
- ],
- "pt_api": [
- "nn.AvgPool2d",
- {
- "kernel_size": "REQUIRED",
- "stride": null,
- "padding": 0,
- "ceil_mode": false,
- "count_include_pad": true,
- "divisor_override": null
- }
- ],
- "ms2pt_mapping": {
- "kernel_size": "kernel_size"
- },
- "gen_explicit_map": "gen_explicit_map_nn_maxpool2d"
- },
- "nn.MaxPool2d": {
- "ms_api": [
- "nn.MaxPool2d",
- {
- "kernel_size": 1,
- "stride": 1,
- "pad_mode": "valid"
- }
- ],
- "pt_api": [
- "nn.MaxPool2d",
- {
- "kernel_size": "REQUIRED",
- "stride": null,
- "padding": 0,
- "dilation": 1,
- "return_indices": false,
- "ceil_mode": "False"
- }
- ],
- "ms2pt_mapping": {
- "kernel_size": "kernel_size"
- },
- "gen_explicit_map": "gen_explicit_map_nn_maxpool2d"
- },
- "nn.Linear": {
- "ms_api": [
- "nn.Dense",
- {
- "in_channels": "REQUIRED",
- "out_channels": "REQUIRED",
- "weight_init": "normal",
- "bias_init": "zeros",
- "has_bias": true,
- "activation": null
- }
- ],
- "pt_api": [
- "nn.Linear",
- {
- "in_features": "REQUIRED",
- "out_features": "REQUIRED",
- "bias": true
- }
- ],
- "ms2pt_mapping": {
- "in_channels": "in_features",
- "out_channels": "out_features",
- "has_bias": "bias"
- }
- },
- "nn.ReLU6": {
- "ms_api": [
- "nn.ReLU6",
- {}
- ],
- "pt_api": [
- "nn.ReLU6",
- {
- "inplace": false
- }
- ],
- "ms2pt_mapping": {}
- },
- "nn.ReLU": {
- "ms_api": [
- "nn.ReLU",
- {}
- ],
- "pt_api": [
- "F.relu",
- {
- "inplace": false
- }
- ],
- "ms2pt_mapping": {}
- },
- "nn.BatchNorm2d": {
- "ms_api": [
- "nn.BatchNorm2d",
- {
- "num_features": "REQUIRED",
- "eps": 1e-05,
- "momentum": 0.9,
- "affine": true,
- "gamma_init": "ones",
- "beta_init": "zeros",
- "moving_mean_init": "zeros",
- "moving_var_init": "ones",
- "use_batch_statistics": true
- }
- ],
- "pt_api": [
- "nn.BatchNorm2d",
- {
- "num_features": "REQUIRED",
- "eps": 1e-05,
- "momentum": 0.1,
- "affine": true,
- "track_running_stats": true
- }
- ],
- "ms2pt_mapping": {
- "num_features": "num_features",
- "eps": "eps",
- "affine": "affine",
- "use_batch_statistics": "track_running_stats"
- },
- "gen_explicit_map": "nn_batchnorm2d_gen_explicit_map"
- },
- "nn.Conv2d": {
- "ms_api": [
- "nn.Conv2d",
- {
- "in_channels": "REQUIRED",
- "out_channels": "REQUIRED",
- "kernel_size": "REQUIRED",
- "stride": 1,
- "pad_mode": "same",
- "padding": 0,
- "dilation": 1,
- "group": 1,
- "has_bias": false,
- "weight_init": "normal",
- "bias_init": "zeros"
- }
- ],
- "pt_api": [
- "nn.Conv2d",
- {
- "in_channels": "REQUIRED",
- "out_channels": "REQUIRED",
- "kernel_size": "REQUIRED",
- "stride": 1,
- "padding": 0,
- "dilation": 1,
- "groups": 1,
- "bias": true,
- "padding_mode": "zeros"
- }
- ],
- "ms2pt_mapping": {
- "in_channels": "in_channels",
- "out_channels": "out_channels",
- "kernel_size": "kernel_size",
- "stride": "stride",
- "padding": "padding",
- "dilation": "dilation",
- "group": "groups",
- "has_bias": "bias"
- },
- "gen_explicit_map": "nn_conv2d_gen_explicit_map"
- },
- "nn.Sequential": {
- "ms_api": [
- "nn.SequentialCell",
- {
- "*args": " REQUIRED"
- }
- ],
- "pt_api": [
- "nn.Sequential",
- {
- "*args": " REQUIRED"
- }
- ],
- "export_key": false,
- "gen_explicit_map": "gen_explicit_map_nn_sequential"
- },
- "nn.BatchNorm1d": {
- "ms_api": [
- "nn.BatchNorm1d",
- {
- "num_features": "REQUIRED",
- "eps": 1e-05,
- "momentum": 0.9,
- "affine": true,
- "gamma_init": "ones",
- "beta_init": "zeros",
- "moving_mean_init": "zeros",
- "moving_var_init": "ones",
- "use_batch_statistics": true
- }
- ],
- "pt_api": [
- "nn.BatchNorm1d",
- {
- "num_features": "REQUIRED",
- "eps": 1e-05,
- "momentum": 0.1,
- "affine": true,
- "track_running_stats": true
- }
- ],
- "ms2pt_mapping": {
- "num_features": "num_features",
- "eps": "eps",
- "affine": "affine",
- "use_batch_statistics": "track_running_stats"
- },
- "gen_explicit_map": "nn_batchnorm1d_gen_explicit_map"
- },
- "nn.LayerNorm": {
- "ms_api": [
- "nn.LayerNorm",
- {
- "normalized_shape": "REQUIRED",
- "begin_norm_axis": -1,
- "begin_params_axis": -1,
- "gamma_init": "ones",
- "beta_init": "zeros",
- "epsilon": 1e-07
- }
- ],
- "pt_api": [
- "nn.LayerNorm",
- {
- "normalized_shape": "REQUIRED",
- "eps": 1e-05,
- "elementwise_affine": true
- }
- ],
- "ms2pt_mapping": {
- "normalized_shape": "normalized_shape",
- "epsilon": "eps"
- }
- },
- "nn.LeakyReLU": {
- "ms_api": [
- "nn.LeakyReLU",
- {
- "alpha": 0.2
- }
- ],
- "pt_api": [
- "nn.LeakyReLU",
- {
- "negative_slope": 0.2,
- "inplace": false
- }
- ],
- "ms2pt_mapping": {
- "alpha": "negative_slope"
- }
- },
- "nn.PReLU": {
- "ms_api": [
- "nn.PReLU",
- {
- "channel": 1,
- "w": 0.25
- }
- ],
- "pt_api": [
- "nn.PReLU",
- {
- "num_parameters": 1,
- "init": 0.25
- }
- ],
- "ms2pt_mapping": {
- "channel": "num_parameters",
- "w": "init"
- }
- },
- "nn.Softmax": {
- "ms_api": [
- "nn.Softmax",
- {
- "axis": -1
- }
- ],
- "pt_api": [
- "nn.Softmax",
- {
- "dim": "REQUIRED"
- }
- ],
- "ms2pt_mapping": {
- "axis": "dim"
- }
- }
- }
|