megengine.functional.po 86.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2020, Megvii
# This file is distributed under the same license as the MegEngine Documents
# package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: MegEngine Documents\n"
"Report-Msgid-Bugs-To: \n"
12
"POT-Creation-Date: 2020-07-07 14:11+0800\n"
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"

#: ../../source/api_zh/megengine.functional.rst:2
msgid "megengine.functional package"
msgstr "megengine.functional package"

#: ../../source/api_zh/megengine.functional.rst:11
msgid "megengine.functional.debug\\_param"
msgstr "megengine.functional.debug\\_param"

#: megengine.functional.debug_param.get_conv_execution_strategy:1 of
msgid "Returns the execuation strategy of :class:`~.Conv2d`."
msgstr "返回 :class:`~.Conv2d` 的执行策略。"

#: megengine.functional.debug_param.get_conv_execution_strategy:3 of
msgid "See :func:`~.set_conv_execution_strategy` for possible return values"
msgstr "参考 :func:`~.set_conv_execution_strategy` 的相关说明了解可能返回的值"

#: megengine.functional.debug_param.get_conv_execution_strategy
#: megengine.functional.elemwise.isinf megengine.functional.elemwise.isnan
#: megengine.functional.graph.grad
#: megengine.functional.loss.binary_cross_entropy
#: megengine.functional.loss.cross_entropy
#: megengine.functional.loss.cross_entropy_with_softmax
#: megengine.functional.loss.hinge_loss megengine.functional.loss.l1_loss
#: megengine.functional.loss.nll_loss megengine.functional.loss.smooth_l1_loss
#: megengine.functional.loss.square_loss
#: megengine.functional.loss.triplet_margin_loss
#: megengine.functional.math.argmax megengine.functional.math.argmin
#: megengine.functional.math.max megengine.functional.math.mean
#: megengine.functional.math.min megengine.functional.math.normalize
#: megengine.functional.math.prod megengine.functional.math.sqrt
#: megengine.functional.math.sum megengine.functional.nn.assert_equal
#: megengine.functional.nn.avg_pool2d megengine.functional.nn.batch_norm2d
#: megengine.functional.nn.batched_matrix_mul megengine.functional.nn.conv2d
#: megengine.functional.nn.conv_transpose2d megengine.functional.nn.dropout
#: megengine.functional.nn.eye megengine.functional.nn.flatten
#: megengine.functional.nn.identity megengine.functional.nn.indexing_one_hot
#: megengine.functional.nn.interpolate megengine.functional.nn.leaky_relu
#: megengine.functional.nn.linear megengine.functional.nn.local_conv2d
#: megengine.functional.nn.matrix_mul megengine.functional.nn.max_pool2d
#: megengine.functional.nn.one_hot megengine.functional.nn.prelu
#: megengine.functional.nn.roi_align megengine.functional.nn.roi_pooling
#: megengine.functional.nn.softmax megengine.functional.nn.softplus
#: megengine.functional.nn.sync_batch_norm
#: megengine.functional.quantized.conv_bias_activation
#: megengine.functional.sort.argsort megengine.functional.sort.sort
#: megengine.functional.sort.top_k megengine.functional.tensor.add_axis
#: megengine.functional.tensor.arange megengine.functional.tensor.broadcast_to
#: megengine.functional.tensor.concat megengine.functional.tensor.cond_take
#: megengine.functional.tensor.dimshuffle megengine.functional.tensor.gather
70 71 72 73 74
#: megengine.functional.tensor.linspace megengine.functional.tensor.remove_axis
#: megengine.functional.tensor.reshape megengine.functional.tensor.scatter
#: megengine.functional.tensor.transpose megengine.functional.tensor.where
#: megengine.functional.tensor.zeros_like megengine.functional.utils.accuracy
#: megengine.functional.utils.zero_grad of
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
msgid "Return type"
msgstr "返回值类型"

#: megengine.functional.debug_param.get_conv_execution_strategy:6 of
msgid ":py:class:`str`"
msgstr ":py:class:`str`"

#: megengine.functional.debug_param.set_conv_execution_strategy:1 of
msgid "Sets the execuation strategy of :class:`~.Conv2d`."
msgstr "设置 :class:`~.Conv2d` 的执行策略。"

#: megengine.functional.debug_param.set_conv_execution_strategy
#: megengine.functional.graph.add_update megengine.functional.graph.grad
#: megengine.functional.loss.binary_cross_entropy
#: megengine.functional.loss.cross_entropy
#: megengine.functional.loss.cross_entropy_with_softmax
#: megengine.functional.loss.hinge_loss megengine.functional.loss.l1_loss
#: megengine.functional.loss.nll_loss megengine.functional.loss.smooth_l1_loss
#: megengine.functional.loss.square_loss
#: megengine.functional.loss.triplet_margin_loss
#: megengine.functional.math.argmax megengine.functional.math.argmin
#: megengine.functional.math.logsumexp megengine.functional.math.max
#: megengine.functional.math.mean megengine.functional.math.min
#: megengine.functional.math.norm megengine.functional.math.normalize
#: megengine.functional.math.prod megengine.functional.math.sqrt
#: megengine.functional.math.sum megengine.functional.nn.assert_equal
#: megengine.functional.nn.avg_pool2d megengine.functional.nn.batch_norm2d
#: megengine.functional.nn.batched_matrix_mul megengine.functional.nn.conv2d
#: megengine.functional.nn.conv_transpose2d megengine.functional.nn.dropout
#: megengine.functional.nn.embedding megengine.functional.nn.eye
#: megengine.functional.nn.flatten megengine.functional.nn.identity
106 107 108 109 110
#: megengine.functional.nn.indexing_one_hot megengine.functional.nn.interpolate
#: megengine.functional.nn.linear megengine.functional.nn.matrix_mul
#: megengine.functional.nn.max_pool2d megengine.functional.nn.one_hot
#: megengine.functional.nn.roi_align megengine.functional.nn.roi_pooling
#: megengine.functional.nn.softmax megengine.functional.nn.sync_batch_norm
111 112 113 114 115 116 117
#: megengine.functional.nn.warp_perspective
#: megengine.functional.quantized.conv_bias_activation
#: megengine.functional.sort.argsort megengine.functional.sort.sort
#: megengine.functional.sort.top_k megengine.functional.tensor.add_axis
#: megengine.functional.tensor.arange megengine.functional.tensor.broadcast_to
#: megengine.functional.tensor.concat megengine.functional.tensor.cond_take
#: megengine.functional.tensor.dimshuffle megengine.functional.tensor.gather
118 119 120 121
#: megengine.functional.tensor.linspace megengine.functional.tensor.remove_axis
#: megengine.functional.tensor.reshape megengine.functional.tensor.scatter
#: megengine.functional.tensor.where megengine.functional.tensor.zeros_like
#: megengine.functional.utils.accuracy megengine.functional.utils.zero_grad of
122 123 124 125 126 127
msgid "Parameters"
msgstr "参数"

#: megengine.functional.debug_param.set_conv_execution_strategy:4 of
msgid ""
"Decides how :class:`~.Conv2d` algorithm is chosen. Available values:  * "
128 129 130 131 132 133 134 135
"'HEURISTIC' uses heuristic to choose the fastest algorithm. * 'PROFILE' "
"runs possible algorithms on real device to find the best. * "
"'PROFILE_HEURISTIC' uses profile result and heuristic to choose the "
"fastest algorithm. * 'PROFILE_REPRODUCIBLE' uses the fastest of profile "
"result that is also reproducible. * 'HEURISTIC_REPRODUCIBLE' uses "
"heuristic to choose the fastest algorithm that is also reproducible.  The"
" default strategy is 'HEURISTIC'.  It can also be set through the "
"environmental variable 'MEGENGINE_CONV_EXECUTION_STRATEGY'."
136 137
msgstr ""
"Decides how :class:`~.Conv2d` algorithm is chosen. Available values:  * "
138 139 140 141 142 143 144 145
"'HEURISTIC' uses heuristic to choose the fastest algorithm. * 'PROFILE' "
"runs possible algorithms on real device to find the best. * "
"'PROFILE_HEURISTIC' uses profile result and heuristic to choose the "
"fastest algorithm. * 'PROFILE_REPRODUCIBLE' uses the fastest of profile "
"result that is also reproducible. * 'HEURISTIC_REPRODUCIBLE' uses "
"heuristic to choose the fastest algorithm that is also reproducible.  The"
" default strategy is 'HEURISTIC'.  It can also be set through the "
"environmental variable 'MEGENGINE_CONV_EXECUTION_STRATEGY'."
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160

#: megengine.functional.debug_param.set_conv_execution_strategy:4 of
msgid "Decides how :class:`~.Conv2d` algorithm is chosen. Available values:"
msgstr "决定 :class:`~.Conv2d` 算法的选择方式。 可能的取值有:"

#: megengine.functional.debug_param.set_conv_execution_strategy:7 of
msgid "'HEURISTIC' uses heuristic to choose the fastest algorithm."
msgstr "'HEURISTIC'使用启发式方法以选择速度最快的算法。"

#: megengine.functional.debug_param.set_conv_execution_strategy:8 of
msgid "'PROFILE' runs possible algorithms on real device to find the best."
msgstr "'PROFILE'在真实的设备上运行可能的所有算法以找出最佳算法。"

#: megengine.functional.debug_param.set_conv_execution_strategy:9 of
msgid ""
161 162
"'PROFILE_HEURISTIC' uses profile result and heuristic to choose the "
"fastest algorithm."
163 164 165 166 167 168 169 170 171 172
msgstr "'PROFILE_HEURISTIC'使用真实设备上的运行速度结果和启发式的方法以选择速度最快的算法。"

#: megengine.functional.debug_param.set_conv_execution_strategy:10 of
msgid ""
"'PROFILE_REPRODUCIBLE' uses the fastest of profile result that is also "
"reproducible."
msgstr "'PROFILE_REPRODUCIBLE'使用在真实设备上运行速度最快并可以复现的算法。"

#: megengine.functional.debug_param.set_conv_execution_strategy:11 of
msgid ""
173 174
"'HEURISTIC_REPRODUCIBLE' uses heuristic to choose the fastest algorithm "
"that is also reproducible."
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
msgstr "'HEURISTIC_REPRODUCIBLE'使用启发式方法选择速度最快并且可以复现的算法。"

#: megengine.functional.debug_param.set_conv_execution_strategy:13 of
msgid "The default strategy is 'HEURISTIC'."
msgstr "默认的策略是'HEURISTIC'。"

#: megengine.functional.debug_param.set_conv_execution_strategy:15 of
msgid ""
"It can also be set through the environmental variable "
"'MEGENGINE_CONV_EXECUTION_STRATEGY'."
msgstr "它也可以通过环境变量“MEGENGINE_CONV_EXECUTION_STRATEGY”进行设置。"

#: ../../source/api_zh/megengine.functional.rst:19
msgid "megengine.functional.elemwise"
msgstr "megengine.functional.elemwise"

#: megengine.functional.elemwise.abs:1 of
msgid "Calculate the absolute value element-wise."
msgstr "逐元素计算绝对值。"

#: megengine.functional.elemwise.add:1 of
msgid "Element-wise addition."
msgstr "逐元素相加。"

199 200 201 202
#: megengine.functional.elemwise.arccos:1 of
msgid "Inverse cosine, element-wise."
msgstr "逐元素计算反余弦值。"

203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
#: megengine.functional.elemwise.arcsin:1 of
msgid "Inverse sine, element-wise."
msgstr "逐元素计算反正弦值。"

#: megengine.functional.elemwise.ceil:1 of
msgid "Return the ceil of the input, element-wise."
msgstr "逐元素返回输入值向上取整后的值。"

#: megengine.functional.elemwise.cos:1 of
msgid "Cosine, element-wise."
msgstr "逐元素计算余弦值。"

#: megengine.functional.elemwise.divide:1 of
msgid "Return (x / y) element-wise."
msgstr "返回逐元素表达式 (x / y) 的值。"

#: megengine.functional.elemwise.equal:1 of
msgid "Return (x == y) element-wise."
msgstr "返回逐元素表达式 (x == y) 的值。"

#: megengine.functional.elemwise.exp:1 of
msgid "Calculate the exponential element-wise"
msgstr "逐元素计算指数。"

227 228 229 230
#: megengine.functional.elemwise.floor:1 of
msgid "Return the floor of the input, element-wise"
msgstr "返回逐元素输入值向下取整后的值。"

231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
#: megengine.functional.elemwise.greater:1 of
msgid "Return (x > y) element-wise."
msgstr "返回逐元素表达式 (x > y) 的值。"

#: megengine.functional.elemwise.greater_equal:1 of
msgid "Return (x >= y) element-wise"
msgstr "返回逐元素表达式 (x >= y) 的值。"

#: megengine.functional.elemwise.isinf:1 of
msgid "Returns a new tensor representing if each element is Inf or not."
msgstr "返回一个张量,它表示每个元素是否是无穷大值(Inf)。"

#: megengine.functional.elemwise.isinf megengine.functional.elemwise.isnan of
msgid "param"
msgstr "参数"

#: megengine.functional.elemwise.isinf:3 megengine.functional.elemwise.isnan:3
#: of
msgid "inp"
msgstr "inp"

#: megengine.functional.elemwise.isinf:4 megengine.functional.elemwise.isnan:4
#: megengine.functional.loss.binary_cross_entropy:10
#: megengine.functional.loss.cross_entropy:37
#: megengine.functional.loss.cross_entropy_with_softmax:22
256 257
#: megengine.functional.loss.hinge_loss:36 megengine.functional.loss.l1_loss:43
#: megengine.functional.loss.nll_loss:37
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
#: megengine.functional.loss.smooth_l1_loss:43
#: megengine.functional.loss.square_loss:30
#: megengine.functional.loss.triplet_margin_loss:20
#: megengine.functional.math.argmax:9 megengine.functional.math.argmin:9
#: megengine.functional.math.max:9 megengine.functional.math.mean:30
#: megengine.functional.math.min:9 megengine.functional.math.normalize:18
#: megengine.functional.math.prod:8 megengine.functional.math.sqrt:5
#: megengine.functional.math.sum:11 megengine.functional.nn.assert_equal:33
#: megengine.functional.nn.avg_pool2d:17
#: megengine.functional.nn.batch_norm2d:30
#: megengine.functional.nn.batched_matrix_mul:7
#: megengine.functional.nn.conv2d:36
#: megengine.functional.nn.conv_transpose2d:36
#: megengine.functional.nn.dropout:11 megengine.functional.nn.eye:12
#: megengine.functional.nn.flatten:35 megengine.functional.nn.identity:7
#: megengine.functional.nn.indexing_one_hot:29
#: megengine.functional.nn.interpolate:41 megengine.functional.nn.leaky_relu:6
#: megengine.functional.nn.linear:14 megengine.functional.nn.local_conv2d:6
#: megengine.functional.nn.matrix_mul:7 megengine.functional.nn.max_pool2d:17
#: megengine.functional.nn.one_hot:30 megengine.functional.nn.prelu:6
#: megengine.functional.nn.roi_align:21 megengine.functional.nn.roi_pooling:13
#: megengine.functional.nn.softmax:19 megengine.functional.nn.softplus:11
#: megengine.functional.nn.sync_batch_norm:28
#: megengine.functional.quantized.conv_bias_activation:40
282
#: megengine.functional.tensor.add_axis:7 megengine.functional.tensor.arange:10
283 284 285 286 287 288 289 290 291
#: megengine.functional.tensor.broadcast_to:7
#: megengine.functional.tensor.concat:11
#: megengine.functional.tensor.cond_take:29
#: megengine.functional.tensor.dimshuffle:18
#: megengine.functional.tensor.gather:46
#: megengine.functional.tensor.linspace:10
#: megengine.functional.tensor.remove_axis:7
#: megengine.functional.tensor.reshape:36
#: megengine.functional.tensor.scatter:62
292
#: megengine.functional.tensor.transpose:5 megengine.functional.tensor.where:35
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
#: megengine.functional.tensor.zeros_like:25
#: megengine.functional.utils.zero_grad:10 of
msgid ":py:class:`~megengine.core.tensor.Tensor`"
msgstr ":py:class:`~megengine.core.tensor.Tensor`"

#: megengine.functional.elemwise.isinf megengine.functional.elemwise.isnan
#: megengine.functional.graph.grad megengine.functional.math.argmax
#: megengine.functional.math.argmin megengine.functional.math.max
#: megengine.functional.math.min megengine.functional.math.norm
#: megengine.functional.math.normalize megengine.functional.math.prod
#: megengine.functional.math.sqrt megengine.functional.math.sum
#: megengine.functional.nn.batched_matrix_mul megengine.functional.nn.dropout
#: megengine.functional.nn.eye megengine.functional.nn.matrix_mul
#: megengine.functional.nn.roi_pooling megengine.functional.sort.argsort
#: megengine.functional.sort.sort megengine.functional.sort.top_k
#: megengine.functional.tensor.add_axis megengine.functional.tensor.arange
#: megengine.functional.tensor.broadcast_to megengine.functional.tensor.concat
#: megengine.functional.tensor.dimshuffle megengine.functional.tensor.linspace
#: megengine.functional.tensor.remove_axis megengine.functional.utils.accuracy
#: of
msgid "Returns"
msgstr "返回"

#: megengine.functional.elemwise.isinf:5 of
317
msgid "a new tensor representing if each element in :attr:`inp` is Inf or not."
318 319 320 321
msgstr "一个新的张量,它表示 :attr:`inp` 中的每个元素是否为无穷大值(Inf)。"

#: megengine.functional.elemwise.isinf:7 megengine.functional.elemwise.isnan:7
#: megengine.functional.loss.cross_entropy:13
322 323
#: megengine.functional.loss.hinge_loss:14 megengine.functional.loss.l1_loss:23
#: megengine.functional.loss.nll_loss:8
324 325 326 327 328 329 330 331 332 333
#: megengine.functional.loss.smooth_l1_loss:22
#: megengine.functional.math.argmax:12 megengine.functional.math.argmin:12
#: megengine.functional.math.max:12 megengine.functional.math.mean:12
#: megengine.functional.math.min:12 megengine.functional.math.prod:11
#: megengine.functional.math.sqrt:8 megengine.functional.math.sum:14
#: megengine.functional.nn.assert_equal:12
#: megengine.functional.nn.batched_matrix_mul:10
#: megengine.functional.nn.dropout:14 megengine.functional.nn.eye:15
#: megengine.functional.nn.flatten:10
#: megengine.functional.nn.indexing_one_hot:11
334 335
#: megengine.functional.nn.interpolate:14 megengine.functional.nn.matrix_mul:10
#: megengine.functional.nn.one_hot:8
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
#: megengine.functional.nn.warp_perspective:24
#: megengine.functional.sort.argsort:10 megengine.functional.sort.sort:10
#: megengine.functional.sort.top_k:16 megengine.functional.tensor.add_axis:10
#: megengine.functional.tensor.arange:13
#: megengine.functional.tensor.broadcast_to:10
#: megengine.functional.tensor.concat:14
#: megengine.functional.tensor.cond_take:9
#: megengine.functional.tensor.dimshuffle:21
#: megengine.functional.tensor.gather:23
#: megengine.functional.tensor.linspace:13
#: megengine.functional.tensor.remove_axis:10
#: megengine.functional.tensor.reshape:10
#: megengine.functional.tensor.scatter:38 megengine.functional.tensor.where:14
#: megengine.functional.tensor.zeros_like:6
#: megengine.functional.utils.accuracy:13 of
msgid "Examples:"
msgstr "例如:"

#: megengine.functional.elemwise.isnan:1 of
msgid "Returns a new tensor representing if each element is NaN or not."
msgstr "返回一个新的张量,该张量表明每个元素是否为非数值类型(NaN)。"

#: megengine.functional.elemwise.isnan:5 of
359
msgid "a new tensor representing if each element in :attr:`inp` is NaN or not."
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391
msgstr "一个新的张量,该张量表示 :attr:`inp` 中的每个元素是否为非数值类型(NaN)。"

#: megengine.functional.elemwise.less:1 of
msgid "Return (x < y) element-wise."
msgstr "返回逐元素 (x < y) 的值。"

#: megengine.functional.elemwise.less_equal:1 of
msgid "Return (x =< y) element-wise."
msgstr "返回逐元素 (x =< y) 的值。"

#: megengine.functional.elemwise.log:1 of
msgid "Natural logarithm (base `e`), element-wise."
msgstr "逐元素的自然对数(底数 `e` )。"

#: megengine.functional.elemwise.maximum:1 of
msgid "Element-wise maximum of array elements."
msgstr "逐元素的最大数组元素。"

#: megengine.functional.elemwise.minimum:1 of
msgid "Element-wise minimum of array elements."
msgstr "逐元素的最小数组元素。"

#: megengine.functional.elemwise.mod:1 of
msgid "Return element-wise remainder of division."
msgstr "返回逐元素相除所得的余数。"

#: megengine.functional.elemwise.multiply:1 of
msgid "Element-wise multiplication."
msgstr "逐元素相乘。"

#: megengine.functional.elemwise.power:1 of
msgid ""
392 393
"First tensor elements raised to powers from second tensor (x ** y), "
"element-wise."
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
msgstr "第一个张量元素按元素从第二个数组提升为幂(x ** y)。"

#: megengine.functional.elemwise.relu:1 of
msgid "Return `max(x, 0)` element-wise."
msgstr "返回逐元素 `max(x, 0)` 的值。"

#: megengine.functional.elemwise.round:1 of
msgid "Round tensor to int element-wise."
msgstr "将所有张量元素四舍五入为整数类型(int)。"

#: megengine.functional.elemwise.sigmoid:1 of
msgid "Return 1 / ( 1 + exp( -x ) ) element-wise."
msgstr "逐元素计算 1 / ( 1 + exp( -x ) ) 的值,并返回。"

#: megengine.functional.elemwise.sin:1 of
msgid "Sine, element-wise."
msgstr "逐元素的正弦值。"

#: megengine.functional.elemwise.subtract:1 of
msgid "Subtract arguments element-wise"
msgstr "逐元素减去参数。"

#: megengine.functional.elemwise.tanh:1 of
msgid "Compute hyperbolic tangent element-wise."
msgstr "逐元素计算双曲正切值。"

#: ../../source/api_zh/megengine.functional.rst:27
msgid "megengine.functional.graph"
msgstr "megengine.functional.graph"

#: megengine.functional.graph.add_extra_vardep:1 of
msgid ""
426 427
"Explicitly set the dependency that tensor ``oup`` depends on tensor "
"``dep``."
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479
msgstr "显式指定张量 ``oup`` 对张量 ``dep`` 的依赖关系。"

#: megengine.functional.graph.add_update:1 of
msgid "Inplace modify ``dest`` as follows:"
msgstr "将 ``dest`` 进行如下的原位更新:"

#: megengine.functional.graph.add_update:3 of
msgid "dest = alpha * dest +  beta * delta + bias"
msgstr "dest = alpha * dest +  beta * delta + bias"

#: megengine.functional.graph.add_update:7 of
msgid "input data that will be inplace modified."
msgstr "需要被原位更新的输入数据。"

#: megengine.functional.graph.add_update:9 of
msgid "update value that will be added to ``dest``."
msgstr "将被加入到 ``dest`` 中的更新值。"

#: megengine.functional.graph.add_update:11 of
msgid "weight ratio of ``dest``. Default: 1.0"
msgstr "``dest`` 的权重。默认: 1.0"

#: megengine.functional.graph.add_update:13 of
msgid "weight ratio of ``delta``. Default: 1.0"
msgstr "``delta`` 的权重。默认:1.0"

#: megengine.functional.graph.add_update:15 of
msgid "bias value appended to the result. Default: 0.0"
msgstr "添加到结果中的偏置量。默认:0.0"

#: megengine.functional.graph.grad:1 of
msgid "Compute the symbolic gradient of ``target`` with repect to ``wrt``."
msgstr "计算 ``target`` 对 ``wrt`` 的符号梯度。"

#: megengine.functional.graph.grad:3 of
msgid "``wrt`` can either be a single tensor or a sequence of tensors."
msgstr "``wrt`` 可以是单一张量或一个张量的序列。"

#: megengine.functional.graph.grad:6 of
msgid "``grad`` target tensor"
msgstr "``grad`` 目标张量"

#: megengine.functional.graph.grad:8 of
msgid "with respect to which to compute the gradient"
msgstr "计算相对于该值的梯度"

#: megengine.functional.graph.grad:10 of
msgid "whether to give warning if ``wrt`` is not endpoint"
msgstr "如果 ``wrt`` 不是终节点,是否给予警告"

#: megengine.functional.graph.grad:12 of
msgid ""
480 481 482
"whether to use virtual ``grad`` opr, so fwd graph can be optimized before"
" applying ``grad``; if ``None`` is given, then virtual ``grad`` would be "
"used if ``graph_opt_level >= 2``"
483 484 485 486 487 488 489
msgstr ""
"是否使用虚拟 ``grad`` 算子, 以便在应使用 ``grad`` 之前优化fwd图;如果给定值为 ``None`` , 则当 "
"``graph_opt_level >= 2`` 时将使用虚拟 ``grad`` 。"

#: megengine.functional.graph.grad:16 of
msgid ""
"if ``target`` does not depend on ``wrt``, set to True to return a zero-"
490 491
"valued :class:`~.Tensor` rather than ``None``; can't be set to False when"
" using virtual ``grad`` opr."
492
msgstr ""
493 494
"如果 ``target`` 不依赖于 ``wrt`` ,则设为True时将返回一个零值(zero-valued)的 "
":class:`~.Tensor` 而非 ``None`` ;当使用虚拟 ``grad`` 算子时,不能设为 None。"
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509

#: megengine.functional.graph.grad:19 of
msgid ""
":py:data:`~typing.Union`\\[:py:class:`~megengine.core.tensor.Tensor`, "
":py:class:`~typing.Iterable`\\[:py:data:`~typing.Optional`\\[:py:class:`~megengine.core.tensor.Tensor`]],"
" ``None``]"
msgstr ""
":py:data:`~typing.Union`\\[:py:class:`~megengine.core.tensor.Tensor`, "
":py:class:`~typing.Iterable`\\[:py:data:`~typing.Optional`\\[:py:class:`~megengine.core.tensor.Tensor`]],"
" ``None``]"

#: megengine.functional.graph.grad:20 of
msgid ":math:`\\partial\\text{target} / \\partial\\text{wrt}`"
msgstr ":math:`\\partial\\text{target} / \\partial\\text{wrt}`"

510
#: ../../source/api_zh/megengine.functional.rst:35
511 512 513 514 515
msgid "megengine.functional.loss"
msgstr "megengine.functional.loss"

#: megengine.functional.loss.binary_cross_entropy:1 of
msgid ""
516 517
"Function that measures the Binary Cross Entropy between the target and "
"the prediction."
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556
msgstr "用于计算目标值与预测值之间的二元交叉熵的函数。"

#: megengine.functional.loss.binary_cross_entropy:4 of
msgid "(N,*) where * means, any number of additional dimensions."
msgstr "(N,*) 其中*指任何附加的维度。"

#: megengine.functional.loss.binary_cross_entropy:6 of
msgid "(N,*), same shape as the input."
msgstr "(N,*),与输入的形状相同。"

#: megengine.functional.loss.cross_entropy:1 of
msgid "Returns the cross entropy loss in a classification problem."
msgstr "返回一个分类问题中的交叉熵损失。"

#: megengine.functional.loss.cross_entropy:3 of
msgid "\\textrm{CrossEntropy}(x, y) = - \\sum_{i} y_i\\log(x_i)"
msgstr "\\textrm{CrossEntropy}(x, y) = - \\sum_{i} y_i\\log(x_i)"

#: megengine.functional.loss.cross_entropy:6
#: megengine.functional.loss.cross_entropy_with_softmax:13 of
msgid "The input tensor representing the predicted probability."
msgstr "表示预测概率的输入张量。"

#: megengine.functional.loss.cross_entropy:7
#: megengine.functional.loss.cross_entropy_with_softmax:15 of
msgid "The input tensor representing the classification label."
msgstr "表示分类标签的输入张量。"

#: megengine.functional.loss.cross_entropy:9 of
msgid "An axis along which cross_entropy will be applied. Default: 1"
msgstr "沿着该轴计算cross_entropy。默认:1"

#: megengine.functional.loss.cross_entropy:11 of
msgid ""
"Specifies a target value that is ignored and does not contribute to the "
"input gradient. Default: -1"
msgstr "表示需要被忽略的分类标签,其对于梯度不会有贡献。默认:-1"

#: megengine.functional.loss.cross_entropy:29
557 558 559 560 561
#: megengine.functional.loss.hinge_loss:28 megengine.functional.loss.l1_loss:35
#: megengine.functional.loss.nll_loss:29
#: megengine.functional.loss.smooth_l1_loss:36 megengine.functional.math.min:24
#: megengine.functional.math.prod:23 megengine.functional.math.sqrt:20
#: megengine.functional.nn.assert_equal:25
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
#: megengine.functional.nn.batched_matrix_mul:28
#: megengine.functional.nn.dropout:28 megengine.functional.nn.eye:27
#: megengine.functional.nn.flatten:26 megengine.functional.nn.interpolate:30
#: megengine.functional.nn.matrix_mul:25 megengine.functional.nn.one_hot:20
#: megengine.functional.nn.warp_perspective:41
#: megengine.functional.sort.argsort:21 megengine.functional.sort.sort:21
#: megengine.functional.sort.top_k:27 megengine.functional.tensor.add_axis:21
#: megengine.functional.tensor.broadcast_to:22
#: megengine.functional.tensor.concat:27
#: megengine.functional.tensor.cond_take:21
#: megengine.functional.tensor.dimshuffle:32
#: megengine.functional.tensor.gather:37
#: megengine.functional.tensor.remove_axis:21
#: megengine.functional.tensor.reshape:21
#: megengine.functional.tensor.scatter:52 megengine.functional.tensor.where:27
#: megengine.functional.utils.accuracy:26 of
msgid "Outputs:"
msgstr "输出:"

#: megengine.functional.loss.cross_entropy_with_softmax:1 of
582
msgid "Returns loss after applying :func:`~.softmax` + :func:`~.cross_entropy`."
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604
msgstr "在应用 :func:`~.softmax` +  :func:`~.cross_entropy` 后返回损失。"

#: megengine.functional.loss.cross_entropy_with_softmax:3 of
msgid ""
"It has better numerical stability compared with sequential calls to "
":func:`~.softmax` and :func:`~.cross_entropy`."
msgstr "与顺序调用 :func:`~.softmax` 和  :func:`~.cross_entropy` 相比,具有更好的数值稳定性。"

#: megengine.functional.loss.cross_entropy_with_softmax:5 of
msgid "When using label smoothing, the label distribution is as follows:"
msgstr "当使用标签平滑(label smoothing)时,标签的分布情况如下:"

#: megengine.functional.loss.cross_entropy_with_softmax:7 of
msgid "y^{LS}_{k}=y_{k}\\left(1-\\alpha\\right)+\\alpha/K"
msgstr "y^{LS}_{k}=y_{k}\\left(1-\\alpha\\right)+\\alpha/K"

#: megengine.functional.loss.cross_entropy_with_softmax:9 of
msgid ""
"where :math:`y^{LS}` and :math:`y` are new label distribution and origin "
"label distribution respectively. k is the index of label distribution. "
":math:`\\alpha` is label_smooth and :math:`K` is the number of classes."
msgstr ""
605 606
"其中 :math:`y^{LS}` 和 :math:`y` 分别是新的标签分布和原始的标签分布。 k是标签分布的索引。 "
":math:`\\alpha` 是label_smooth, :math:`K` 是类的数量。"
607 608 609 610 611 612 613

#: megengine.functional.loss.cross_entropy_with_softmax:17 of
msgid "An axis along which softmax will be applied. Default: 1."
msgstr "沿着该维度应用SOFTMAX。默认:1。"

#: megengine.functional.loss.cross_entropy_with_softmax:19 of
msgid ""
614 615
"A label smoothing of parameter that can re-distribute target "
"distribution. Default: 0."
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630
msgstr "用于对原始标签分布进行标签平滑的参数。默认:0。"

#: megengine.functional.loss.hinge_loss:1 of
msgid "Caculate the hinge loss which is often used in SVMs."
msgstr "计算支持向量机SVM中经常使用的hinge loss。"

#: megengine.functional.loss.hinge_loss:3 of
msgid "The hinge loss can be described as:"
msgstr "hinge loss可以表示为:"

#: megengine.functional.loss.hinge_loss:5 of
msgid "loss(x, y) = \\frac{1}{N}\\sum_i\\sum_j(max(0, 1 - x_i_j*y_i_j))"
msgstr "loss(x, y) = \\frac{1}{N}\\sum_i\\sum_j(max(0, 1 - x_i_j*y_i_j))"

#: megengine.functional.loss.hinge_loss:8 of
631
msgid "The input tensor representing the predicted probability, shape is (N, C)."
632 633 634 635
msgstr "表示预测概率的输入张量,形为(N,C)。"

#: megengine.functional.loss.hinge_loss:10 of
msgid ""
636 637
"The input tensor representing the binary classification label, shape is "
"(N, C)."
638 639 640 641 642 643 644 645
msgstr "表示二分类标签的输入张量,形为(N,C)。"

#: megengine.functional.loss.hinge_loss:12 of
msgid "Specify the norm to caculate the loss, should be \"L1\" or \"L2\"."
msgstr "指定计算损失时采用的范数,应为 \"L1\" 或 \"L2\" 。"

#: megengine.functional.loss.l1_loss:1 of
msgid ""
646 647
"Calculates the mean absolute error (MAE) between each element in the pred"
" :math:`x` and label :math:`y`."
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672
msgstr "计算预测值 :math:`x` 和标签值 :math:`y` 的每个元素之间的平均绝对误差(MAE)。"

#: megengine.functional.loss.l1_loss:4 of
msgid "The mean absolute error can be described as:"
msgstr "平均绝对误差可以表示为:"

#: megengine.functional.loss.l1_loss:6 of
msgid "\\ell(x,y) = mean\\left(L \\right)"
msgstr "\\ell(x,y) = mean\\left(L \\right)"

#: megengine.functional.loss.l1_loss:8 megengine.functional.loss.square_loss:8
#: of
msgid "where"
msgstr "式中,"

#: megengine.functional.loss.l1_loss:10 of
msgid "L = \\{l_1,\\dots,l_N\\}, \\quad l_n = \\left| x_n - y_n \\right|,"
msgstr "L = \\{l_1,\\dots,l_N\\}, \\quad l_n = \\left| x_n - y_n \\right|,"

#: megengine.functional.loss.l1_loss:15
#: megengine.functional.loss.square_loss:15 of
msgid ""
":math:`x` and :math:`y` are tensors of arbitrary shapes with a total of "
":math:`N` elements each. :math:`N` is the batch size."
msgstr ""
673 674
":math:`x` 和 :math:`y` 是任意形状的张量,各张量包含 :math:`N` 个元素。  :math:`N` "
"是批(batch)大小。"
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693

#: megengine.functional.loss.l1_loss:19 megengine.functional.loss.nll_loss:4
#: megengine.functional.loss.smooth_l1_loss:18
#: megengine.functional.loss.square_loss:19 of
msgid "The predicted result from model."
msgstr "从模型中预测的结果。"

#: megengine.functional.loss.l1_loss:21 megengine.functional.loss.nll_loss:6
#: megengine.functional.loss.smooth_l1_loss:20
#: megengine.functional.loss.square_loss:21 of
msgid "The ground truth to compare."
msgstr "用于比较的真实值。"

#: megengine.functional.loss.nll_loss:1 of
msgid "The negative log likelihood loss."
msgstr "负对数似然损失。"

#: megengine.functional.loss.smooth_l1_loss:1 of
msgid ""
694 695
"Caculate the smooth l1 loss proposed in `Fast R-CNN paper by Ross "
"Girshick`."
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711
msgstr "计算在 `Fast R-CNN paper by Ross Girshick` 中提出的smooth l1损失。"

#: megengine.functional.loss.smooth_l1_loss:3 of
msgid "The smooth l1 loss can be described as:"
msgstr "smooth l1损失可以表示为:"

#: megengine.functional.loss.smooth_l1_loss:5 of
msgid "\\text{loss}(x, y) = \\frac{1}{n} \\sum_{i} l_{i}"
msgstr "\\text{loss}(x, y) = \\frac{1}{n} \\sum_{i} l_{i}"

#: megengine.functional.loss.smooth_l1_loss:8 of
msgid "where :math:`l_{i}` is given by:"
msgstr "其中 :math:`l_{i}` 由下式给出:"

#: megengine.functional.loss.smooth_l1_loss:10 of
msgid ""
712 713
"l_{i} = \\begin{cases} 0.5 (x_i - y_i)^2, & \\text{if } |x_i - y_i| < 1 "
"\\\\ |x_i - y_i| - 0.5, & \\text{otherwise } \\end{cases}"
714
msgstr ""
715 716
"l_{i} = \\begin{cases} 0.5 (x_i - y_i)^2, & \\text{if } |x_i - y_i| < 1 "
"\\\\ |x_i - y_i| - 0.5, & \\text{otherwise } \\end{cases}"
717 718 719

#: megengine.functional.loss.square_loss:1 of
msgid ""
720 721
"Calculates the mean squared error (squared L2 norm) between each element "
"in the pred :math:`x` and label :math:`y`."
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750
msgstr "计算预测值 :math:`x` 和标签值 :math:`y` 之间的均方误差(平方L2范数)。"

#: megengine.functional.loss.square_loss:4 of
msgid "The mean squared error can be described as:"
msgstr "均方误差可以表示为:"

#: megengine.functional.loss.square_loss:6 of
msgid "\\ell(x, y) = mean\\left( L \\right)"
msgstr "\\ell(x, y) = mean\\left( L \\right)"

#: megengine.functional.loss.square_loss:10 of
msgid "L = \\{l_1,\\dots,l_N\\}, \\quad l_n = \\left( x_n - y_n \\right)^2,"
msgstr "L = \\{l_1,\\dots,l_N\\}, \\quad l_n = \\left( x_n - y_n \\right)^2,"

#: megengine.functional.loss.square_loss:28 of
msgid "Shape:"
msgstr "形状:"

#: megengine.functional.loss.square_loss:24 of
msgid ""
"pred: :math:`(N, *)` where :math:`*` means any number of additional "
"dimensions"
msgstr "预测值 : :math:`(N, *)` ,这里的 :math:`*` 指任何附加的维度。"

#: megengine.functional.loss.square_loss:26 of
msgid "label: :math:`(N, *)`. Same shape as ``pred``"
msgstr "标签: :math:`(N, *)`. 与 ``pred`` 的形状相同"

#: megengine.functional.loss.triplet_margin_loss:1 of
751
msgid "Creates a criterion that measures the triplet loss given an input tensors."
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783
msgstr "创建一个标准,用于计算给定输入张量的三元组损失(triplet loss)。"

#: megengine.functional.loss.triplet_margin_loss:3 of
msgid ""
"L(a, p, n) = max\\left\\{d\\left(a_{i},p_{i}\\right)-d\\left(a_{i}, "
"n_{i}\\right)+margin, 0\\right\\},\\ "
"d\\left(x_{i},y_{i}\\right)=\\left\\|x_{i}-y_{i}\\right\\|_{p}"
msgstr ""
"L(a, p, n) = max\\left\\{d\\left(a_{i},p_{i}\\right)-d\\left(a_{i}, "
"n_{i}\\right)+margin, 0\\right\\},\\ "
"d\\left(x_{i},y_{i}\\right)=\\left\\|x_{i}-y_{i}\\right\\|_{p}"

#: megengine.functional.loss.triplet_margin_loss:9 of
msgid "The input tensor representing the anchor samples."
msgstr "表示锚采样的输入张量。"

#: megengine.functional.loss.triplet_margin_loss:11 of
msgid "The input tensor representing the positive samples."
msgstr "表示正样本的输入张量。"

#: megengine.functional.loss.triplet_margin_loss:13 of
msgid "The input tensor representing the negative samples."
msgstr "表示负样本的输入张量。"

#: megengine.functional.loss.triplet_margin_loss:15 of
msgid "Default: 1.0"
msgstr "默认:1.0"

#: megengine.functional.loss.triplet_margin_loss:17 of
msgid "The norm degree for pairwise distance. Default: 2.0"
msgstr "计算成对距离使用的范数。默认:2.0"

784
#: ../../source/api_zh/megengine.functional.rst:43
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837
msgid "megengine.functional.math"
msgstr "megengine.functional.math"

#: megengine.functional.math.argmax:1 of
msgid "Returns the indices of the maximum values along an axis"
msgstr "返回某轴上所有最大值的索引"

#: megengine.functional.math.argmax:4 megengine.functional.math.argmin:4
#: megengine.functional.math.max:4 megengine.functional.math.mean:6
#: megengine.functional.math.min:4 megengine.functional.math.norm:4
#: megengine.functional.math.prod:4 megengine.functional.math.sqrt:4
#: megengine.functional.nn.dropout:5 megengine.functional.nn.identity:4
#: megengine.functional.tensor.broadcast_to:4 of
msgid "The input tensor"
msgstr "输入张量"

#: megengine.functional.math.argmax:6 megengine.functional.math.argmin:6
#: megengine.functional.math.max:6 megengine.functional.math.mean:8
#: megengine.functional.math.min:6 megengine.functional.math.norm:8
#: megengine.functional.math.sum:6 of
msgid ""
"The dimension to reduce. If None, all the dimensions will be reduced. "
"Default: None"
msgstr "要进行降低的维度。如果设置为None,则所有的维度都将减小。默认:None"

#: megengine.functional.math.argmax:8 megengine.functional.math.argmin:8
#: megengine.functional.math.max:8 megengine.functional.math.min:8 of
msgid "Whether the output tensor has *axis* retained or not. Default: False"
msgstr "输出张量是否保留了轴 *axis* 。默认:false"

#: megengine.functional.math.argmax:10 megengine.functional.math.argmin:10
#: megengine.functional.math.max:10 megengine.functional.math.min:10
#: megengine.functional.math.norm:10 megengine.functional.math.prod:9
#: megengine.functional.math.sum:12 megengine.functional.nn.dropout:12
#: megengine.functional.tensor.add_axis:8
#: megengine.functional.tensor.broadcast_to:8
#: megengine.functional.tensor.concat:12
#: megengine.functional.tensor.dimshuffle:19
#: megengine.functional.tensor.remove_axis:8 of
msgid "The output tensor"
msgstr "输出张量"

#: megengine.functional.math.argmin:1 of
msgid "Returns the indices of the minimum values along an axis"
msgstr "返回一个轴上最小值的索引"

#: megengine.functional.math.logsumexp:1 of
msgid ""
"Compute the log of the sum of exponentials of inputs along the given "
":attr:`axis`. The computation is numerically stabilized."
msgstr "计算输入数据沿给定维度 :attr:`axis` 的指数之和的对数(log)。该计算是数值稳定的。"

#: megengine.functional.math.logsumexp:3 of
838 839 840 841 842 843
msgid ""
"\\mathsf{logsumexp}(x_1, \\dots, x_n) = \\log(\\exp(x_1) + \\cdots + "
"\\exp(x_n))"
msgstr ""
"\\mathsf{logsumexp}(x_1, \\dots, x_n) = \\log(\\exp(x_1) + \\cdots + "
"\\exp(x_n))"
844 845 846 847 848 849 850 851 852

#: megengine.functional.math.logsumexp:8 megengine.functional.math.sum:4
#: megengine.functional.nn.avg_pool2d:6 megengine.functional.nn.flatten:4
#: megengine.functional.nn.max_pool2d:6 megengine.functional.nn.softmax:12 of
msgid "The input tensor."
msgstr "输入张量。"

#: megengine.functional.math.logsumexp:10 of
msgid ""
853 854
"Axis over which the sum is taken. It can be a single axis or a list of "
"axes."
855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894
msgstr "求和计算所在的维度。可以是单个维度或维度的列表。"

#: megengine.functional.math.logsumexp:12 of
msgid "whether to retain :attr:`axis` or not for the output tensor."
msgstr "输出张量是否保留 :attr:`axis` 。"

#: megengine.functional.math.max:1 of
msgid "Returns the max value of the input tensor along given *axis*."
msgstr "返回输入张量在给定轴 *axis* 上的最大值。"

#: megengine.functional.math.mean:1 of
msgid ""
"Returns the mean value of each row of the ``inp`` tensor in the given "
"``axis``. If axis is a list of dimensions, reduce over all of them."
msgstr "返回在给定轴 ``axis`` 上 ``inp`` 张量每一行的平均值。如果给定的轴是一个维度列表,则减小所有维度。"

#: megengine.functional.math.mean:10 megengine.functional.math.norm:9
#: megengine.functional.math.sum:9 of
msgid "Whether the output tensor has ``axis`` retained or not. Default: False"
msgstr "输出张量是否保留了轴 ``axis`` 。 默认: False"

#: megengine.functional.math.min:1 of
msgid "Returns the min value of input tensor along given *axis*."
msgstr "返回输入张量在给定轴 *axis* 上的最小值。"

#: megengine.functional.math.norm:1 of
msgid "Calculate ``p``-norm of input tensor along certain axis."
msgstr "计算输入张量在某些轴上的 ``p`` -范数。"

#: megengine.functional.math.norm:6 megengine.functional.math.normalize:12 of
msgid "power of value ``p`` applied to ``inp``. Default: 2"
msgstr "对 ``inp`` 进行 ``p`` 次幂计算. 默认:2"

#: megengine.functional.math.normalize:1 of
msgid "Perform :math:`L_p` normalization of input tensor along certain axis."
msgstr "计算输入张量在某些轴上的 :math:`L_p` 范数。"

#: megengine.functional.math.normalize:3 of
msgid ""
"For a tensor :attr:`inp` of shape :math:`(n_0, ..., n_{dim}, ..., n_k)`, "
895 896
"each :math:`n_{dim}` -element vector :math:`v` along dimension "
":attr:`axis` is transformed as:"
897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933
msgstr ""
"对于一个形如 :math:`(n_0, ..., n_{dim}, ..., n_k)` 的张量 :attr:`inp` , 其每个 "
":math:`n_{dim}` - :attr:`axis` 维度上的元素向量 :math:`v` 将转化为:"

#: megengine.functional.math.normalize:6 of
msgid "v = \\frac{v}{\\max(\\lVert v \\rVert_p, \\epsilon)}."
msgstr "v = \\frac{v}{\\max(\\lVert v \\rVert_p, \\epsilon)}."

#: megengine.functional.math.normalize:10 of
msgid "the input tensor"
msgstr "输入张量"

#: megengine.functional.math.normalize:14 of
msgid ""
"The dimension to reduce. If None, all the dimensions will be reduced to "
"calculate the norm. Default: None"
msgstr "要进行降低的维度。如果设置为None,则所有的维度都将降低,用于计算范数。默认:None"

#: megengine.functional.math.normalize:17 of
msgid "a small value to avoid division by zero. Default: 1e-12"
msgstr "为防止0做除数而设的较小值。 默认: 1e-12"

#: megengine.functional.math.normalize:19 of
msgid "the normalized output tensor"
msgstr "归一化的输出张量"

#: megengine.functional.math.prod:1 of
msgid "Returns the element product of input tensor along given *axis*."
msgstr "返回输入张量在给定维度 *axis* 上各元素的乘积。"

#: megengine.functional.math.prod:6 of
msgid ""
"The dimension to reduce. If None, all the dimensions will be reduced. "
"Default: ``None``"
msgstr "降维操作中降低的维度。如果设置为None,则所有的维度都将减小。默认:  ``None`` "

#: megengine.functional.math.prod:7 of
934
msgid "Whether the output tensor has *axis* retained or not. Default: ``False``"
935 936 937 938 939 940 941 942 943 944 945
msgstr "输出张量是否保留了轴 *axis* 。 默认: ``False`` "

#: megengine.functional.math.sqrt:1 of
msgid "Return a new tensor with the square-root of the elements of ``inp``"
msgstr "返回一个包含 ``inp`` 中各元素平方根的新的张量"

#: megengine.functional.math.sqrt:6 of
msgid "The computed tensor"
msgstr "计算得到的张量"

#: megengine.functional.math.sum:1 of
946
msgid "Returns the sum of each row of the ``inp`` tensor in the given ``axis``."
947 948
msgstr "返回 ``inp`` 张量在给定轴 ``axis`` 上每一行的和。"

949
#: ../../source/api_zh/megengine.functional.rst:51
950 951 952 953 954
msgid "megengine.functional.nn"
msgstr "megengine.functional.nn"

#: megengine.functional.nn.assert_equal:1 of
msgid ""
955 956
"Asserts that ``get`` equals to ``expect``, and returns value of "
"``expect``."
957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982
msgstr "断言 ``get`` 等于 ``expect`` ,并返回 ``expect`` 的值。"

#: megengine.functional.nn.assert_equal:4 of
msgid "tensor to be checked."
msgstr "要检查的张量。"

#: megengine.functional.nn.assert_equal:6 of
msgid "tensor with expected values."
msgstr "期望值张量。"

#: megengine.functional.nn.assert_equal:8 of
msgid "tolerance that two float values are asserted equal. Default: 1e-4"
msgstr "断言两个浮点(float)值相等时的容忍度(tolerance)。 默认: 1e-4"

#: megengine.functional.nn.assert_equal:10 of
msgid "whether to print details if two tensors are not equal. Default: False"
msgstr "如果两个张量不相等时,是否需要输出细节。 默认: False"

#: megengine.functional.nn.avg_pool2d:1 of
msgid "Applies a 2D average pooling over an input."
msgstr "对输入进行二维平均池化。"

#: megengine.functional.nn.avg_pool2d:3 of
msgid "Refer to :class:`~.AvgPool2d` for more information."
msgstr "更多信息参见 :class:`~.AvgPool2d` 。"

983
#: megengine.functional.nn.avg_pool2d:8 megengine.functional.nn.max_pool2d:8 of
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027
msgid "The size of the window."
msgstr "窗口的尺寸。"

#: megengine.functional.nn.avg_pool2d:10 megengine.functional.nn.max_pool2d:10
#: of
msgid ""
"The stride of the window. If not provided, its value is set to "
"``kernel_size``. Default: None"
msgstr "窗口的步长。 如果该值没有给出,则将值设置为 ``kernel_size`` 。默认: None"

#: megengine.functional.nn.avg_pool2d:13 megengine.functional.nn.max_pool2d:13
#: of
msgid "Implicit zero padding to be added on both sides. Default: 0"
msgstr "添加在每一侧的隐含零值填充。 默认: 0"

#: megengine.functional.nn.batch_norm2d:1 of
msgid "Applies batch normalization to the input."
msgstr "对输入进行批标准化。"

#: megengine.functional.nn.batch_norm2d:3
#: megengine.functional.nn.sync_batch_norm:3 of
msgid ""
"Refer to :class:`~.BatchNorm2d` and :class:`~.BatchNorm1d` for more "
"information."
msgstr "更多信息参见 :class:`~.BatchNorm2d` 和 :class:`~.BatchNorm1d` 。"

#: megengine.functional.nn.batch_norm2d:6
#: megengine.functional.nn.sync_batch_norm:5 of
msgid "input tensor."
msgstr "输入张量。"

#: megengine.functional.nn.batch_norm2d:8
#: megengine.functional.nn.sync_batch_norm:7 of
msgid "tensor to store running mean."
msgstr "存储运行中的均值的张量。"

#: megengine.functional.nn.batch_norm2d:10
#: megengine.functional.nn.sync_batch_norm:9 of
msgid "tensor to store running variance."
msgstr "存储运行中的方差的张量。"

#: megengine.functional.nn.batch_norm2d:12
#: megengine.functional.nn.sync_batch_norm:11 of
msgid ""
1028 1029
"scaling tensor in the learnable affine parameters. See :math:`\\gamma` in"
" :class:`~.BatchNorm2d`"
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041
msgstr "可学习仿射参数中的放缩张量。可参阅 :class:`~.BatchNorm2d` 中的 :math:`\\gamma`"

#: megengine.functional.nn.batch_norm2d:15
#: megengine.functional.nn.sync_batch_norm:14 of
msgid ""
"bias tensor in the learnable affine parameters. See :math:`eta` in "
":class:`~.BatchNorm2d`"
msgstr "可学习仿射参数中的偏置张量。可参阅 :class:`~.BatchNorm2d` 中的 :math:`eta`"

#: megengine.functional.nn.batch_norm2d:18
#: megengine.functional.nn.sync_batch_norm:17 of
msgid ""
1042 1043
"a boolean value to indicate whether batch norm is performed in traning "
"mode. Default: ``False``"
1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054
msgstr "一个布尔值,它表示是否执行训练模式下的批归一化,  即对当前批数据进行统计并更新统计量。 默认: ``False``"

#: megengine.functional.nn.batch_norm2d:21
#: megengine.functional.nn.sync_batch_norm:20 of
msgid ""
"the value used for the ``running_mean`` and ``running_var`` computation. "
"Default: 0.9"
msgstr "用于计算 ``running_mean`` 和 ``running_var`` 的值。 默认: 0.9"

#: megengine.functional.nn.batch_norm2d:25
#: megengine.functional.nn.sync_batch_norm:24 of
1055
msgid "a value added to the denominator for numerical stability. Default: 1e-5."
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121
msgstr "为提高数值稳定性而添加到分母中的值。 默认: 1e-5。"

#: megengine.functional.nn.batched_matrix_mul:1 of
msgid ""
"Performs a batched multiplication of th batched matrices ``inp1`` and "
"``inp2``"
msgstr "对批矩阵 ``inp1`` 和 ``inp2`` 进行批处理乘法"

#: megengine.functional.nn.batched_matrix_mul:4 of
msgid "The first batch matrix to be multiplied (n, a, b)"
msgstr "相乘计算中的第一个batch矩阵 (n, a, b)"

#: megengine.functional.nn.batched_matrix_mul:6 of
msgid "The second batch matrix to be multiplied (n, b, c)"
msgstr "相乘计算中的第二个batch矩阵 (n, b, c)"

#: megengine.functional.nn.batched_matrix_mul:8 of
msgid "The output batch (n, a, c)"
msgstr "输出batch (n, a, c)"

#: megengine.functional.nn.conv2d:1 of
msgid "2D convolution operation."
msgstr "二维卷积运算。"

#: megengine.functional.nn.conv2d:3 of
msgid "Refer to :class:`~.Conv2d` for more information."
msgstr "更多信息参见 :class:`~.Conv2d` 。"

#: megengine.functional.nn.conv2d:6 megengine.functional.nn.conv_transpose2d:6
#: megengine.functional.quantized.conv_bias_activation:4 of
msgid "The feature map of the convolution operation"
msgstr "卷积运算的特征图"

#: megengine.functional.nn.conv2d:8 megengine.functional.nn.conv_transpose2d:8
#: megengine.functional.quantized.conv_bias_activation:6 of
msgid "The convolution kernel"
msgstr "卷积核"

#: megengine.functional.nn.conv2d:10
#: megengine.functional.nn.conv_transpose2d:10 of
msgid "The bias added to the result of convolution (if given)"
msgstr "添加到卷积结果中的偏置量(如果给定该值)"

#: megengine.functional.nn.conv2d:12
#: megengine.functional.nn.conv_transpose2d:12
#: megengine.functional.quantized.conv_bias_activation:10 of
msgid "Stride of the 2D convolution operation. Default: 1"
msgstr "二维卷积运算中的步长。 默认: 1"

#: megengine.functional.nn.conv2d:14
#: megengine.functional.nn.conv_transpose2d:14
#: megengine.functional.quantized.conv_bias_activation:12 of
msgid ""
"Size of the paddings added to the input on both sides of its spatial "
"dimensions. Only zero-padding is supported. Default: 0"
msgstr "在输入值的空间维度上每一侧填充的尺寸。 仅支持用零值填充。 默认: 0"

#: megengine.functional.nn.conv2d:17
#: megengine.functional.nn.conv_transpose2d:17
#: megengine.functional.quantized.conv_bias_activation:15 of
msgid "Dilation of the 2D convolution operation. Default: 1"
msgstr "二维卷积运算的扩张值(dilation)。 默认: 1"

#: megengine.functional.nn.conv2d:19
#: megengine.functional.quantized.conv_bias_activation:17 of
msgid ""
1122 1123 1124 1125 1126
"number of groups to divide input and output channels into, so as to "
"perform a \"grouped convolution\". When ``groups`` is not 1, "
"``in_channels`` and ``out_channels`` must be divisible by ``groups``, and"
" the shape of weight should be ``(groups, out_channel // groups, "
"in_channels // groups, height, width)``."
1127
msgstr ""
1128 1129 1130 1131
"将输入和输出通道划分成的组数, 以便执行分组卷积 \"grouped convolution\" 。 当组数 ``groups`` "
"不为1时,输入通道 ``in_channels`` 和输出通道 ``out_channels`` 必须能被 ``groups`` 整除, "
"权值矩阵的形状应为  ``(groups, out_channel // groups, in_channels // groups, "
"height, width)`` 。"
1132 1133 1134 1135 1136

#: megengine.functional.nn.conv2d:25
#: megengine.functional.nn.conv_transpose2d:25
#: megengine.functional.quantized.conv_bias_activation:23 of
msgid ""
1137 1138
"Supports 'CROSS_CORRELATION' or 'CONVOLUTION'. Default: "
"'CROSS_CORRELATION'."
1139 1140 1141 1142 1143 1144 1145
msgstr "支持 'CROSS_CORRELATION' 或 'CONVOLUTION'。 默认: 'CROSS_CORRELATION' 。"

#: megengine.functional.nn.conv2d:29
#: megengine.functional.nn.conv_transpose2d:29
#: megengine.functional.quantized.conv_bias_activation:33 of
msgid ""
"When set to 'DEFAULT', no special requirements will be placed on the "
1146 1147 1148
"precision of intermediate results. When set to 'FLOAT32', Float32 would "
"be used for accumulator and intermediate result, but only effective when "
"input and output are of Float16 dtype."
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162
msgstr ""
"当该值设置为 'DEFAULT' 时,对中间结果的精度不做特殊要求。当设置为 'FLOAT32' "
"时,累加器和中间结果将使用Float32类型,但该设置仅当输入和输出为Float16类型时有效。"

#: megengine.functional.nn.conv_transpose2d:1 of
msgid "2D transposed convolution operation."
msgstr "二维转置卷积运算。"

#: megengine.functional.nn.conv_transpose2d:3 of
msgid "Refer to :class:`~.ConvTranspose2d` for more information."
msgstr "更多信息参见 :class:`~.ConvTranspose2d` 。"

#: megengine.functional.nn.conv_transpose2d:19 of
msgid ""
1163 1164 1165 1166 1167
"number of groups to divide input and output channels into, so as to "
"perform a \"grouped convolution\". When ``groups`` is not 1, "
"``in_channels`` and ``out_channels`` must be divisible by ``groups``, and"
" the shape of weight should be ``(groups, out_channel // groups, "
"in_channels // groups, height, width)``. Default: 1"
1168
msgstr ""
1169 1170 1171 1172
"将输入和输出通道划分成的组数, 以便执行分组卷积 \"grouped convolution\" 。 当组数 ``groups`` "
"不为1时,输入通道 ``in_channels`` 和输出通道 ``out_channels`` 必须能被 ``groups`` 整除, "
"权值矩阵的形状应为  ``(groups, out_channel // groups, in_channels // groups, "
"height, width)`` 。默认:1"
1173 1174 1175 1176 1177

#: megengine.functional.nn.dropout:1 of
msgid ""
"Returns a new tensor where each of the elements are randomly set to zero "
"with probability P = ``drop_prob``. Optionally rescale the output tensor."
1178
msgstr "返回一个新张量,其中每个元素按概率 P = ``drop_prob`` =``drop_prob`` 随机被设置为零。可以选择是否重新缩放输出张量。"
1179 1180 1181 1182 1183 1184 1185 1186

#: megengine.functional.nn.dropout:7 of
msgid "The probability to drop (set to zero) a single element"
msgstr "丢弃单个元素(将其设置为0)的概率"

#: megengine.functional.nn.dropout:9 of
msgid ""
"The default behavior of ``dropout`` during training is to rescale the "
1187 1188
"output, then it can be replaced by an :class:`~.Identity` during "
"inference, default to True."
1189
msgstr ""
1190 1191
"``dropout`` 在训练阶段的默认操作是 重新缩放输出张量, 这样它就可以在推理过程中被一个 :class:`~.Identity` 代替,"
" 默认值为True."
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245

#: megengine.functional.nn.embedding:1 of
msgid "Applies lookup table for embedding."
msgstr "根据输入从给定的词向量矩阵中获取词向量"

#: megengine.functional.nn.embedding:4 of
msgid "the tensor with indices."
msgstr "带有索引的张量。"

#: megengine.functional.nn.embedding:6 of
msgid "the learnable weights which embedding from."
msgstr "可学习的词向量矩阵,行数为最大可能的词向量序号加一,列数等于词向量大小。"

#: megengine.functional.nn.embedding:8 megengine.functional.nn.embedding:10
#: megengine.functional.nn.embedding:12 of
msgid "should be set to None, not support now."
msgstr "应设置为None,当前尚不支持。"

#: megengine.functional.nn.embedding:15 of
msgid "Refer to :class:`~.Embedding` for more information."
msgstr "更多信息参见 :class:`~.Embedding` 。"

#: megengine.functional.nn.eye:1 of
msgid "Returns a 2D tensor with ones on the diagonal and zeros elsewhere."
msgstr "返回一个二维张量,其对角线上值均为1,其他位置值为0。"

#: megengine.functional.nn.eye:4 of
msgid "The number of rows"
msgstr "行数"

#: megengine.functional.nn.eye:6 of
msgid "The number of columns. Default: None"
msgstr "列数。默认:None"

#: megengine.functional.nn.eye:7 of
msgid "The data type. Default: None"
msgstr "数据类型。默认:None"

#: megengine.functional.nn.eye:9 of
msgid "Compute node of the matrix. Default: None"
msgstr "矩阵的计算节点。默认:None"

#: megengine.functional.nn.eye:11 of
msgid "Compute graph of the matrix. Default: None"
msgstr "矩阵的计算图。默认:None"

#: megengine.functional.nn.eye:13 of
msgid "The eye matrix"
msgstr "单位矩阵"

#: megengine.functional.nn.flatten:1 of
msgid ""
"Reshapes the tensor by flattening the sub-tensor from dimension "
"``start_axis`` to dimension ``end_axis``."
1246
msgstr "将张量的 ``start_axis`` 维到 ``end_axis`` 维部分,展平为一维"
1247 1248 1249

#: megengine.functional.nn.flatten:6 of
msgid "The start dimension that the sub-tensor to be flattened. Default: 0"
1250
msgstr "需要被展平的子张量的起始维数。 默认: 0"
1251 1252 1253

#: megengine.functional.nn.flatten:8 of
msgid "The end dimension that the sub-tensor to be flattened. Default: -1"
1254
msgstr "需要被展平的子张量的终止维数。 默认: -1"
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300

#: megengine.functional.nn.identity:1 of
msgid "applies an identity transform to the input tensor."
msgstr "对输入张量进行恒等变换。"

#: megengine.functional.nn.indexing_one_hot:1 of
msgid "One-hot indexing for some axis."
msgstr "对一些轴进行One-hot索引。"

#: megengine.functional.nn.indexing_one_hot:4 of
msgid "input data tensor."
msgstr "输入数据张量。"

#: megengine.functional.nn.indexing_one_hot:6 of
msgid "index tensor."
msgstr "索引张量。"

#: megengine.functional.nn.indexing_one_hot:8 of
msgid "the axis on src for which values in index index. Default: 1"
msgstr "源数据上的轴,索引值为其索引。 默认: 1"

#: megengine.functional.nn.indexing_one_hot:9 of
msgid "whether not to remove the axis in result. Default: ``False``"
msgstr "是否在结果数据中删除该轴。 默认: ``False`` "

#: megengine.functional.nn.interpolate:1 of
msgid ""
"Down/up samples the input tensor to either the given :attr:`size` or the "
"given :attr:`scale_factor`"
msgstr "按照给定的 :attr:`size` 或 :attr:`scale_factor` 对输入张量进行向下/向上采样"

#: megengine.functional.nn.interpolate:5 megengine.functional.nn.one_hot:4
#: megengine.functional.tensor.zeros_like:4 of
msgid "input tensor"
msgstr "输入张量"

#: megengine.functional.nn.interpolate:7 of
msgid "size of the output tensor. Default: ``None``"
msgstr "输出张量的尺寸。 默认: ``None``"

#: megengine.functional.nn.interpolate:9 of
msgid "scaling factor of the output tensor. Default: ``None``"
msgstr "输出张量的比例因子。 默认: ``None``"

#: megengine.functional.nn.interpolate:11 of
msgid ""
1301 1302
"interpolation methods, acceptable values are: 'BILINEAR', 'LINEAR'. "
"Default: ``BILINEAR``"
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384
msgstr "插值方法,可选的值有:双线性插值 'BILINEAR' ,线性插值 'LINEAR' 。默认: ``BILINEAR`` "

#: megengine.functional.nn.leaky_relu:1 of
msgid "Applies the element-wise leaky_relu function"
msgstr "逐元素使用leaky_relu函数"

#: megengine.functional.nn.leaky_relu:3 of
msgid "Refer to :class:`~.LeakyReLU` for more information."
msgstr "更多信息参见 :class:`~.LeakyReLU` 。"

#: megengine.functional.nn.linear:1 of
msgid "Applies a linear transformation to the input."
msgstr "对输入进行线性变换。"

#: megengine.functional.nn.linear:3 of
msgid "Refer to :class:`~.module.linear.Linear` for more information."
msgstr "更多信息参见: :class:`~.module.linear.Linear` 。"

#: megengine.functional.nn.linear:6 of
msgid "the input tensor with shape `(N, in_features)`."
msgstr "形为 `(N, in_features)` 的输入向量。"

#: megengine.functional.nn.linear:8 of
msgid "the weight with shape `(out_features, in_features)`."
msgstr "形为 `(out_features, in_features)` 的权值矩阵。"

#: megengine.functional.nn.linear:10 of
msgid "the bias with shape `(out_features,)`. Default: ``None``"
msgstr "形为 `(out_features,)` 的偏置值向量。 默认: ``None`` "

#: megengine.functional.nn.local_conv2d:1 of
msgid "Applies spatial 2D convolution over an image with untied kernels."
msgstr "使用untied kernels对图像进行二维空域卷积。"

#: megengine.functional.nn.local_conv2d:3 of
msgid "Refer to :class:`~.LocalConv2d` for more information."
msgstr "更多信息参见 :class:`~.LocalConv2d` 。"

#: megengine.functional.nn.matrix_mul:1 of
msgid "Performs a matrix multiplication of the matrices ``inp1`` and ``inp2``"
msgstr "对矩阵 ``inp1`` 和 ``inp2`` 进行矩阵乘法"

#: megengine.functional.nn.matrix_mul:4 of
msgid "The first matrix to be multiplied (a, b)"
msgstr "相乘计算中的第一个矩阵 (a, b)"

#: megengine.functional.nn.matrix_mul:6 of
msgid "The second matrix to be multiplied (b, c)"
msgstr "相乘计算中的第二个矩阵 (b, c)"

#: megengine.functional.nn.matrix_mul:8 of
msgid "The output tensor (a, c)"
msgstr "输出张量 (a, c)"

#: megengine.functional.nn.max_pool2d:1 of
msgid "Applies a 2D max pooling over an input."
msgstr "对输入进行二维最大池化。"

#: megengine.functional.nn.max_pool2d:3 of
msgid "Refer to :class:`~.MaxPool2d` for more information."
msgstr "更多信息参见 :class:`~.MaxPool2d` 。"

#: megengine.functional.nn.one_hot:1 of
msgid "Perform one-hot encoding for the input tensor."
msgstr "对输入张量进行one-hot编码。"

#: megengine.functional.nn.one_hot:6 of
msgid "number of classes denotes the last dimension of the output tensor"
msgstr "表示输出张量最后一个维度的类数"

#: megengine.functional.nn.prelu:1 of
msgid "Applies the element-wise PReLU function."
msgstr "逐元素使用PReLU函数。"

#: megengine.functional.nn.prelu:3 of
msgid "Refer to :class:`~.PReLU` for more information."
msgstr "更多信息参见 :class:`~.PReLU` 。"

#: megengine.functional.nn.roi_align:1 of
msgid "Apply roi align on input feature"
msgstr "对输入特征使用roi align"

1385
#: megengine.functional.nn.roi_align:4 megengine.functional.nn.roi_pooling:4 of
1386 1387 1388 1389 1390
msgid "tensor that represents the input feature, (N, C, H, W) images"
msgstr "表示输入特征的张量,形为 (N, C, H, W) 的图像"

#: megengine.functional.nn.roi_align:6 of
msgid ""
1391 1392
"(N, 5) boxes. First column is the index into N. The other 4 columns are "
"xyxy"
1393 1394 1395 1396 1397 1398 1399 1400
msgstr "形为(N,5)的box。第一列是N的索引,其它4列分别是xyxy"

#: megengine.functional.nn.roi_align:8 of
msgid "(height, width) shape of output rois feature."
msgstr "以(height, width)形式输出rois feature的形状。"

#: megengine.functional.nn.roi_align:10 of
msgid ""
1401 1402 1403 1404 1405
"\"max\" or \"average\", use max/average align just like max/average "
"pooling. Default: ``\"average\"``"
msgstr ""
"\"max\" 或 \"average\", 像使用最大/平均池化一样使用 max/average align。 默认: "
"``\"average\"`` "
1406 1407 1408 1409 1410 1411 1412 1413

#: megengine.functional.nn.roi_align:12 megengine.functional.nn.roi_pooling:12
#: of
msgid "scale the input boxes by this number. Default: 1.0"
msgstr "用这个数值缩放输入的box。 默认: 1.0"

#: megengine.functional.nn.roi_align:14 of
msgid ""
1414 1415
"number of inputs samples to take for each output sample. 0 to take "
"samples densely. Default: 2"
1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429
msgstr "每个输出样本要使用的输入样本个数。该值为0则进行密集采样。 默认: 2"

#: megengine.functional.nn.roi_align:17 of
msgid ""
"wheather align the input feature, with `aligned=True`, we first "
"appropriately scale the ROI and then shift it by -0.5. Default: True"
msgstr "用 `aligned=True` 来指定是否与输入特征对齐,首先适当缩放ROI,然后赋予其-0.5的偏移量。 默认: True"

#: megengine.functional.nn.roi_pooling:1 of
msgid "Apply roi pooling on input feature"
msgstr "对输入特征使用roi池化"

#: megengine.functional.nn.roi_pooling:6 of
msgid ""
1430 1431
"(K, 5) boxes. First column is the index into N. The other 4 columns are "
"xyxy"
1432 1433 1434 1435 1436 1437 1438 1439
msgstr "形为(K,5)的box。第一列是N的索引,其它4列分别是xyxy"

#: megengine.functional.nn.roi_pooling:8 of
msgid "(height, width) of output rois feature"
msgstr "输出rois特征的(height, width)"

#: megengine.functional.nn.roi_pooling:10 of
msgid ""
1440 1441
"\"max\" or \"average\", use max/average align just like max/average "
"pooling. Default: ``\"max\"``"
1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457
msgstr "\"max\" 或 \"average\", 像使用最大/平均池化一样使用 max/average align。 默认:  ``\"max\"`` "

#: megengine.functional.nn.roi_pooling:14 of
msgid "(K, C, output_shape[0], output_shape[1]) feature of rois"
msgstr "(K, C, output_shape[0], output_shape[1]) rois的特征"

#: megengine.functional.nn.softmax:1 of
msgid "Applies a softmax function. Softmax is defined as:"
msgstr "使用softmax函数。softmax被定义为:"

#: megengine.functional.nn.softmax:3 of
msgid "\\text{Softmax}(x_{i}) = \\frac{\\exp(x_i)}{\\sum_j \\exp(x_j)}"
msgstr "\\text{Softmax}(x_{i}) = \\frac{\\exp(x_i)}{\\sum_j \\exp(x_j)}"

#: megengine.functional.nn.softmax:6 of
msgid ""
1458 1459
"It is applied to all elements along axis, and will re-scale them so that "
"the elements lie in the range `[0, 1]` and sum to 1."
1460 1461 1462 1463 1464 1465 1466 1467
msgstr "这将应用到该轴的所有元素上,并重新缩放这些元素使其能够处于 `[0, 1]` 的范围内并且和为1。"

#: megengine.functional.nn.softmax:9 of
msgid "See :class:`~megengine.module.activation.Softmax` for more details."
msgstr "更多信息参见 :class:`~megengine.module.activation.Softmax` 。"

#: megengine.functional.nn.softmax:14 of
msgid ""
1468 1469
"An axis along which softmax will be applied. By default, softmax will "
"apply along the highest ranked axis."
1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481
msgstr "在该轴上使用softmax方法。默认情况下,softmax将在序号最大的轴上使用。"

#: megengine.functional.nn.softplus:1 of
msgid "Performs the elementwise function:"
msgstr "逐元素使用下面的函数:"

#: megengine.functional.nn.softplus:3 of
msgid "\\mathsf{softplus}(x) = \\log(1+\\exp(\\beta x)) / \\beta."
msgstr "\\mathsf{softplus}(x) = \\log(1+\\exp(\\beta x)) / \\beta."

#: megengine.functional.nn.softplus:7 of
msgid ""
1482 1483
"For numerical stability the identity function is used when :math:`\\beta "
"x > \\textrm{threshold}`."
1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497
msgstr ""
"为保证数值稳定性,当 :math:`\\beta x > \\textrm{threshold}` 时使用恒等函数(identity "
"function)。"

#: megengine.functional.nn.sync_batch_norm:1 of
msgid "Applies synchronized batch normalization to the input."
msgstr "对输入进行同步批标准化。"

#: megengine.functional.nn.warp_perspective:1 of
msgid "Applies perspective transformation to batched 2D images."
msgstr "对按批组织的二维图像进行透视变换。"

#: megengine.functional.nn.warp_perspective:3 of
msgid ""
1498 1499
"The input images are transformed to the output images by the "
"transformation matrix:"
1500 1501 1502 1503
msgstr "输入图像通过变换矩阵变换为输出图像:"

#: megengine.functional.nn.warp_perspective:5 of
msgid ""
1504 1505 1506 1507
"\\text{output}(n, c, h, w) = \\text{input} \\left( n, c,     "
"\\frac{M_{00}h + M_{01}w + M_{02}}{M_{20}h + M_{21}w + M_{22}},     "
"\\frac{M_{10}h + M_{11}w + M_{12}}{M_{20}h + M_{21}w + M_{22}}     "
"\\right)"
1508
msgstr ""
1509 1510 1511 1512
"\\text{output}(n, c, h, w) = \\text{input} \\left( n, c,     "
"\\frac{M_{00}h + M_{01}w + M_{02}}{M_{20}h + M_{21}w + M_{22}},     "
"\\frac{M_{10}h + M_{11}w + M_{12}}{M_{20}h + M_{21}w + M_{22}}     "
"\\right)"
1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537

#: megengine.functional.nn.warp_perspective:12 of
msgid "input image"
msgstr "输入图像"

#: megengine.functional.nn.warp_perspective:14 of
msgid "(batch, 3, 3) transformation matrix"
msgstr "(batch, 3, 3) 变换矩阵"

#: megengine.functional.nn.warp_perspective:16 of
msgid "(h, w) size of the output image"
msgstr "(h,w)形式的输出图像的大小"

#: megengine.functional.nn.warp_perspective:18 of
msgid "pixel extrapolation method. Default: ``\"REPLICATE\"``"
msgstr "像素外推方法。 默认: ``\"REPLICATE\"`` "

#: megengine.functional.nn.warp_perspective:20 of
msgid "value used in case of a constant border. Default: ``0``"
msgstr "边界填充值。 默认: ``0`` "

#: megengine.functional.nn.warp_perspective:22 of
msgid "interpolation methods. Default: ``\"LINEAR\"``"
msgstr "插值方法。 默认: ``\"LINEAR\"``"

1538
#: ../../source/api_zh/megengine.functional.rst:59
1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561
msgid "megengine.functional.quantized"
msgstr "megengine.functional.quantized"

#: megengine.functional.quantized.conv_bias_activation:1 of
msgid "convolution bias with activation operation, only for inference."
msgstr "带有激活操作的卷积偏置,仅用于推断(inference)。"

#: megengine.functional.quantized.conv_bias_activation:8 of
msgid "The bias added to the result of convolution"
msgstr "添加到卷积结果中的偏置量"

#: megengine.functional.quantized.conv_bias_activation:25 of
msgid "Support for np.dtype, Default: np.int8."
msgstr "支持np.dtype, 默认:np.int8。"

#: megengine.functional.quantized.conv_bias_activation:27 of
msgid "scale if use quantization, Default: 0.0."
msgstr "使用量化操作后进行的缩放, 默认: 0.0。"

#: megengine.functional.quantized.conv_bias_activation:29 of
msgid "scale if use quantization quint8, Default: 0.0."
msgstr "使用quint8量化操作后进行的缩放, 默认: 0.0。"

1562
#: ../../source/api_zh/megengine.functional.rst:67
1563 1564 1565 1566 1567
msgid "megengine.functional.sort"
msgstr "megengine.functional.sort"

#: megengine.functional.sort.argsort:1 megengine.functional.sort.sort:1 of
msgid ""
1568 1569
"Sort the target 2d matrix by row, return both the sorted tensor and "
"indices."
1570 1571 1572 1573 1574 1575 1576 1577 1578
msgstr "对目标二维矩阵进行按行排序,返回排序后的张量及索引。"

#: megengine.functional.sort.argsort:4 megengine.functional.sort.sort:4
#: megengine.functional.sort.top_k:4 of
msgid "The input tensor, if 2d, each row will be sorted"
msgstr "输入张量,如果是二维的,则该张量的每行将进行排序"

#: megengine.functional.sort.argsort:6 megengine.functional.sort.sort:6 of
msgid ""
1579 1580
"Sort in descending order, where the largest comes first. Default: "
"``False``"
1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619
msgstr "降序排列,即最大值位于第一位置。 默认: ``False`` "

#: megengine.functional.sort.argsort:7 megengine.functional.sort.sort:7
#: megengine.functional.sort.top_k:13 of
msgid ""
":py:data:`~typing.Tuple`\\[:py:class:`~megengine.core.tensor.Tensor`, "
":py:class:`~megengine.core.tensor.Tensor`]"
msgstr ""
":py:data:`~typing.Tuple`\\[:py:class:`~megengine.core.tensor.Tensor`, "
":py:class:`~megengine.core.tensor.Tensor`]"

#: megengine.functional.sort.argsort:8 megengine.functional.sort.sort:8 of
msgid "Tuple of two tensors (sorted_tensor, indices_of_int32)"
msgstr "由两个张量组成的元组 (sorted_tensor, indices_of_int32)"

#: megengine.functional.sort.top_k:1 of
msgid "Selected the Top-K (by default) smallest elements of 2d matrix by row."
msgstr "按行排序,选出二维矩阵中Top-K(默认情况下)个最小元素。"

#: megengine.functional.sort.top_k:6 of
msgid "The number of elements needed"
msgstr "所需元素的个数"

#: megengine.functional.sort.top_k:8 of
msgid "If true, return the largest elements instead. Default: ``False``"
msgstr "该值如果为true,则返回最大元素。 默认: ``False`` "

#: megengine.functional.sort.top_k:10 of
msgid "If true, only the k-th element will be returned. Default: ``False``"
msgstr "该值如果为true,则只返回第k个元素。 默认: ``False`` "

#: megengine.functional.sort.top_k:12 of
msgid "If true, the returned elements can be unordered. Default: ``False``"
msgstr "该值如果为true,则返回值可能是无序的。 默认: ``False`` "

#: megengine.functional.sort.top_k:14 of
msgid "Tuple of two tensors (topk_tensor, indices_of_int32)"
msgstr "由两个张量组成的元组 (topk_tensor, indices_of_int32)"

1620
#: ../../source/api_zh/megengine.functional.rst:75
1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640
msgid "megengine.functional.tensor"
msgstr "megengine.functional.tensor"

#: megengine.functional.tensor.add_axis:1 of
msgid "Add dimension before given axis."
msgstr "在给定的axis前添加维度。"

#: megengine.functional.tensor.add_axis:4
#: megengine.functional.tensor.dimshuffle:4
#: megengine.functional.tensor.remove_axis:4
#: megengine.functional.tensor.reshape:5 of
msgid "Input tensor"
msgstr "输入张量"

#: megengine.functional.tensor.add_axis:6 of
msgid "Place of new axes"
msgstr "若干新轴的位置"

#: megengine.functional.tensor.arange:1 of
msgid ""
1641 1642
"Returns a Tensor with values from `start` to `end` with adjacent interval"
" `step`"
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697
msgstr "返回一个数值从 `start` 到  `end` ,相邻间隔为 `step` 的张量。"

#: megengine.functional.tensor.arange:4 of
msgid "starting value of the squence, shoule be scalar"
msgstr "序列的第一个值,应为标量"

#: megengine.functional.tensor.arange:6 of
msgid "ending value of the squence, shoule be scalar"
msgstr "序列的最后一个值,应为标量"

#: megengine.functional.tensor.arange:8 of
msgid "the gap between each pair of adjacent values. Default 1"
msgstr "每对相邻值之间的间隔。默认:1"

#: megengine.functional.tensor.arange:9 megengine.functional.tensor.linspace:9
#: of
msgid "result data type"
msgstr "结果的数据类型"

#: megengine.functional.tensor.arange:11
#: megengine.functional.tensor.linspace:11 of
msgid "The generated tensor"
msgstr "生成的张量"

#: megengine.functional.tensor.broadcast_to:1 of
msgid "Broadcast a tensor to ``shape``"
msgstr "将张量广播至 ``shape`` "

#: megengine.functional.tensor.broadcast_to:6 of
msgid "The target shape"
msgstr "目标形状"

#: megengine.functional.tensor.concat:1 of
msgid "Concat some tensors"
msgstr "拼接一些张量"

#: megengine.functional.tensor.concat:4 of
msgid "Input tensors to concat"
msgstr "将要进行拼接的输入张量"

#: megengine.functional.tensor.concat:6 of
msgid "the dimension over which the tensors are concatenated. Default: 0"
msgstr "对张量进行拼接的维度。默认:0"

#: megengine.functional.tensor.concat:8 of
msgid "The comp node output on. Default: None"
msgstr "输出所在的计算节点。 默认:None"

#: megengine.functional.tensor.concat:10 of
msgid "The graph in which output is. Default: None"
msgstr "输出所在的图。 默认:None"

#: megengine.functional.tensor.cond_take:1 of
msgid ""
"Take elements from data if specific condition is satisfied on mask. This "
1698 1699 1700 1701
"operator has two outputs: the first is the elements taken, and the second"
" is the indices corresponding to those elements; they are both "
"1-dimensional. High-dimension input would first be flattened."
msgstr "如果在mask上满足了特定条件,则从数据中取出元素。此算子有两个输出:第一个是取出的元素,第二个是这些元素对应的索引;两个输出都是一维的。高维数据输入时将首先被展平。"
1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722

#: megengine.functional.tensor.cond_take:4 of
msgid "condition param; must be the same shape with data"
msgstr "条件参数;必须与数据的形状相同"

#: megengine.functional.tensor.cond_take:6 of
msgid "input tensor from which to take elements"
msgstr "将从其中取出元素的输入张量"

#: megengine.functional.tensor.cond_take:7 of
msgid "value to be compared to by mode"
msgstr "要进行比较的mask中的值"

#: megengine.functional.tensor.dimshuffle:1 of
msgid "Swap shapes and strides according to given pattern"
msgstr "根据给定模板交换形状和步长(stride)。"

#: megengine.functional.tensor.dimshuffle:6 of
msgid ""
"a list of integers including 0, 1, ... , ``ndim``-1, and any number of "
"``'x'`` char in dimensions where this tensor should be broadcasted. For "
1723 1724 1725 1726 1727 1728 1729
"examples:  * (``'x'``) -> make a 0d (scalar) into a 1d vector * (0, 1) ->"
" identity for 2d vectors * (1, 0) -> inverts the first and second "
"dimensions * (``'x'``, 0) -> make a row out of a 1d vector (N to 1xN) * "
"(0, ``'x'``) -> make a column out of a 1d vector (N to Nx1) * (2, 0, 1) "
"-> AxBxC to CxAxB * (0, ``'x'``, 1) -> AxB to Ax1xB * (1, ``'x'``, 0) -> "
"AxB to Bx1xA * (1,) -> This remove dimensions 0. It must be a "
"broadcastable dimension (1xA to A)"
1730 1731 1732 1733 1734 1735 1736
msgstr " "

#: megengine.functional.tensor.dimshuffle:6 of
msgid ""
"a list of integers including 0, 1, ... , ``ndim``-1, and any number of "
"``'x'`` char in dimensions where this tensor should be broadcasted. For "
"examples:"
1737
msgstr "一个包含0, 1, ... , ``ndim`` -1的整型数(int)列表,任意数量的 ``'x'`` 字符位于张量要进行广播的维度上。例如:"
1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772

#: megengine.functional.tensor.dimshuffle:8 of
msgid "(``'x'``) -> make a 0d (scalar) into a 1d vector"
msgstr "(``'x'``) -> 将一个0维向量(标量)放入一个1维向量中"

#: megengine.functional.tensor.dimshuffle:9 of
msgid "(0, 1) -> identity for 2d vectors"
msgstr "(0, 1) -> 等价的2维向量"

#: megengine.functional.tensor.dimshuffle:10 of
msgid "(1, 0) -> inverts the first and second dimensions"
msgstr "(1, 0) -> 将第一维和第二维互换"

#: megengine.functional.tensor.dimshuffle:11 of
msgid "(``'x'``, 0) -> make a row out of a 1d vector (N to 1xN)"
msgstr "(``'x'``, 0) -> 将1维向量 (N to 1xN) 中的数排成一行"

#: megengine.functional.tensor.dimshuffle:12 of
msgid "(0, ``'x'``) -> make a column out of a 1d vector (N to Nx1)"
msgstr "(0, ``'x'``) -> 将一维向量 (N to Nx1)中的数排成一列"

#: megengine.functional.tensor.dimshuffle:13 of
msgid "(2, 0, 1) -> AxBxC to CxAxB"
msgstr "(2, 0, 1) -> AxBxC 变为 CxAxB"

#: megengine.functional.tensor.dimshuffle:14 of
msgid "(0, ``'x'``, 1) -> AxB to Ax1xB"
msgstr "(0, ``'x'``, 1) -> AxB 变为 Ax1xB"

#: megengine.functional.tensor.dimshuffle:15 of
msgid "(1, ``'x'``, 0) -> AxB to Bx1xA"
msgstr "(1, ``'x'``, 0) -> AxB 变为 Bx1xA"

#: megengine.functional.tensor.dimshuffle:16 of
msgid ""
1773 1774
"(1,) -> This remove dimensions 0. It must be a broadcastable dimension "
"(1xA to A)"
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789
msgstr "(1,) -> 这样就删除了第0维。最终一定变为可以广播的维度 (1xA to A)"

#: megengine.functional.tensor.gather:1 of
msgid "Gather data from :attr:`inp` on :attr:`axis` using :attr:`index`."
msgstr "使用 :attr:`index` 从 :attr:`axis` 上的 :attr:`inp` 聚合数据。"

#: megengine.functional.tensor.gather:3 of
msgid "For a 3-D tensor, the output is specified by::"
msgstr "对于三维张量, 输出由下面内容确定::"

#: megengine.functional.tensor.gather:9 of
msgid ""
"if :attr:`inp` is an n-dimensional tensor with size "
":math:`(x_0,x_1,...,x_{i-1},x_i,x_{i+1},...,x_{n-1})` and axis=i, then "
":attr:`index` must be an n-dimensional tensor with size "
1790 1791
":math:`(x_0,x_1,...,x_{i-1},y,x_{i+1},...,x_{n-1})` where :math:`y\\ge 1`"
" and output will have the same size as :attr:`index`."
1792
msgstr ""
1793 1794 1795 1796 1797
"如果 :attr:`inp` 是一个尺寸为  "
":math:`(x_0,x_1,...,x_{i-1},x_i,x_{i+1},...,x_{n-1})` 且 axis=i的n维张量,则 "
":attr:`index` 必须是一个尺寸为  "
":math:`(x_0,x_1,...,x_{i-1},y,x_{i+1},...,x_{n-1})` 的n维张量,这里的 "
":math:`y\\ge 1` 和输出的尺寸都必须必须与 :attr:`index` 的尺寸相同。"
1798 1799 1800 1801 1802

#: megengine.functional.tensor.gather:17 of
msgid "the source tensor"
msgstr "源张量"

1803 1804
#: megengine.functional.tensor.gather:19 megengine.functional.tensor.scatter:32
#: of
1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843
msgid "the axis along which to index"
msgstr "将要进行索引的轴"

#: megengine.functional.tensor.gather:21 of
msgid "the indices of elements to gather"
msgstr "将要进行聚合的元素的索引"

#: megengine.functional.tensor.linspace:1 of
msgid "Return equally spaced numbers over a specified interval"
msgstr "返回指定间隔的等距数列"

#: megengine.functional.tensor.linspace:4 of
msgid "Starting value of the squence, shoule be scalar"
msgstr "序列的第一个值,应为标量"

#: megengine.functional.tensor.linspace:6 of
msgid "The last value of the squence, shoule be scalar"
msgstr "序列的最后一个值,应为标量"

#: megengine.functional.tensor.linspace:8 of
msgid "number of values to generate"
msgstr "将要产生的值的个数"

#: megengine.functional.tensor.remove_axis:1 of
msgid "Remove dimension of shape 1."
msgstr "删除形状(shape)中下标为1的维度。"

#: megengine.functional.tensor.remove_axis:6 of
msgid "Place of axis to be removed"
msgstr "将要被移除的轴的位置"

#: megengine.functional.tensor.reshape:1 of
msgid ""
"Reshape a tensor to given target shape; total number of logical elements "
"must remain unchanged"
msgstr "将一个张量重塑为给定的目标形状;逻辑元素的总数必须保持不变"

#: megengine.functional.tensor.reshape:7 of
msgid ""
1844 1845
"target shape, the components would be concatenated to form the target "
"shape, and it can contain an element of -1 representing unspec_axis."
1846 1847 1848 1849 1850 1851 1852 1853 1854 1855
msgstr "目标形状,所有组件将被连接成目标形状,其中可能包含用来表示unspec_axis的值为-1的元素。"

#: megengine.functional.tensor.scatter:1 of
msgid ""
"Writes all values from the tensor :attr:`source` into :attr:`inp` at the "
"indices specified in the :attr:`index` tensor."
msgstr "把张量 :attr:`source` 中所有的值写入到 :attr:`inp` 中通过 :attr:`index` 张量指定的索引位置上。"

#: megengine.functional.tensor.scatter:3 of
msgid ""
1856 1857 1858
"For each value in :attr:`source`, its output index is specified by its "
"index in :attr:`source` for ``axis != dimension`` and by the "
"corresponding value in :attr:`index` for ``axis = dimension``."
1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888
msgstr ""
"对于 :attr:`source` 中的每个值,它的输出索引在 ``axis != dimension`` 时,为 :attr:`source` "
"的索引或在 ``axis = dimension`` 时,为 :attr:`index` 中相对应的值。"

#: megengine.functional.tensor.scatter:7 of
msgid "For a 3-D tensor, :attr:`inp` is updated as::"
msgstr "对于三维张量, :attr:`inp` 将更新为::"

#: megengine.functional.tensor.scatter:13 of
msgid ""
":attr:`inp`, :attr:`index` and :attr:`source` should have same number of "
"dimensions."
msgstr " :attr:`inp` , :attr:`index` 和 :attr:`source` 应当具有相同的维数。"

#: megengine.functional.tensor.scatter:15 of
msgid ""
"It is also required that ``source.shape(d) <= inp.shape(d)`` and "
"``index.shape(d) == source.shape(d)`` for all dimensions ``d``."
msgstr ""
"在所有维度上需要满足 ``source.shape(d) <= inp.shape(d)`` 以及 ``index.shape(d) == "
"source.shape(d)`` 。"

#: megengine.functional.tensor.scatter:18 of
msgid ""
"Moreover, the values of :attr:`index` must be between ``0`` and "
"``inp.shape(axis) - 1`` inclusive."
msgstr "此外, :attr:`index` 的值必须介于 ``0`` 和 ``inp.shape(axis) - 1`` 之间(包含边界)。"

#: megengine.functional.tensor.scatter:21 of
msgid ""
1889 1890
"Please notice that, due to performance issues, the result is uncertain on"
" the GPU device if scatter difference positions from source to the same "
1891 1892 1893 1894 1895 1896
"destination position regard to index tensor."
msgstr "请注意,在GPU设备上,由于性能原因,若多个源数据被 index 指定同一个目标位置时,结果会不确定。"

#: megengine.functional.tensor.scatter:25 of
msgid ""
"Show the case using the following examples, the oup[0][2] is maybe from "
1897 1898 1899
"source[0][2] which value is 0.2256 or source[1][2] which value is 0.5339 "
"if set the index[1][2] from 1 to 0."
msgstr "使用以下例子展示案例,如果将index[1][2]设置为1到0,则oup[0][2]可能来自值为0.2256的source[0][2],或值为0.5339的source[1][2]。"
1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926

#: megengine.functional.tensor.scatter:30 of
msgid "the inp tensor which to be scattered"
msgstr "将要进行scatter操作的inp张量"

#: megengine.functional.tensor.scatter:34 of
msgid "the indices of elements to scatter"
msgstr "将要进行scatter操作的元素的索引"

#: megengine.functional.tensor.scatter:36 of
msgid "the source element(s) to scatter"
msgstr "将要进行scatter操作的inp张量一个或多个源元素"

#: megengine.functional.tensor.shapeof:1 of
msgid "The shape of input tensor."
msgstr "输入张量的形状。"

#: megengine.functional.tensor.transpose:1 of
msgid "Equivalent to :func:`dimshuffle`"
msgstr "与 :func:`dimshuffle` 等价"

#: megengine.functional.tensor.where:1 of
msgid "Select elements either from Tensor x or Tensor y, according to mask."
msgstr "根据mask选出Tensor x或Tensor y中的元素。"

#: megengine.functional.tensor.where:3 of
msgid ""
1927 1928
"\\textrm{out}_i = x_i \\textrm{ if } \\textrm{mask}_i \\textrm{ is True "
"else } y_i"
1929
msgstr ""
1930 1931
"\\textrm{out}_i = x_i \\textrm{ if } \\textrm{mask}_i \\textrm{ is True "
"else } y_i"
1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948

#: megengine.functional.tensor.where:8 of
msgid "a mask used for choosing x or y"
msgstr "用于选择x或y的mask"

#: megengine.functional.tensor.where:10 of
msgid "the first choice"
msgstr "第一个选择"

#: megengine.functional.tensor.where:12 of
msgid "the second choice"
msgstr "第二个选择"

#: megengine.functional.tensor.zeros_like:1 of
msgid "Returns a zero tensor with the same shape as input tensor"
msgstr "返回一个与输入张量形状相同的零张量"

1949
#: ../../source/api_zh/megengine.functional.rst:83
1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969
msgid "megengine.functional.utils"
msgstr "megengine.functional.utils"

#: megengine.functional.utils.accuracy:1 of
msgid ""
"Calculate the classification accuracy given predicted logits and ground-"
"truth labels."
msgstr "根据给定的预测的logits和真实值标签计算分类准确率。"

#: megengine.functional.utils.accuracy:4 of
msgid ""
"Model predictions of shape [batch_size, num_classes], representing the "
"probability (likelyhood) of each class."
msgstr "模型预测值,形为 [batch_size, num_classes] ,表示其属于各类别(class)的概率。"

#: megengine.functional.utils.accuracy:7 of
msgid "Ground-truth labels, 1d tensor of int32"
msgstr "真实值标签,int32类型的一维张量"

#: megengine.functional.utils.accuracy:9 of
1970
msgid "Specifies the topk values, could be an int or tuple of ints. Default: 1"
1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014
msgstr "指定前k个值,可以是整型数,也可以是整型数构成的元组。 默认: 1"

#: megengine.functional.utils.accuracy:10 of
msgid ""
":py:data:`~typing.Union`\\[:py:class:`~megengine.core.tensor.Tensor`, "
":py:class:`~typing.Iterable`\\[:py:class:`~megengine.core.tensor.Tensor`]]"
msgstr ""
":py:data:`~typing.Union`\\[:py:class:`~megengine.core.tensor.Tensor`, "
":py:class:`~typing.Iterable`\\[:py:class:`~megengine.core.tensor.Tensor`]]"

#: megengine.functional.utils.accuracy:11 of
msgid "Tensor(s) of classification accuracy between 0.0 and 1.0"
msgstr "表示分类准确率的张量(一个或多个),数值介于0.0到1.0之间"

#: megengine.functional.utils.zero_grad:1 of
msgid ""
"Returns a tensor which is treated as constant during backward gradient "
"calcuation, i.e. its gradient is zero."
msgstr "返回一个在反向梯度计算期间被视为常量的张量,即其梯度为0。"

#: megengine.functional.utils.zero_grad:5 of
msgid "Input tensor."
msgstr "输入张量。"

#: megengine.functional.utils.zero_grad:7 of
msgid "See implementation of :func:`~.softmax` for example."
msgstr "具体例子请参阅 :func:`~.softmax` 的执行。"

#~ msgid "compute symbolic grad"
#~ msgstr "计算符号梯度"

#~ msgid "Returns prod of input tensor along given *axis*."
#~ msgstr "返回输入张量在给定轴 *axis* 上各元素的乘积。"

#~ msgid "param axis"
#~ msgstr "参数 轴"

#~ msgid "param keepdims"
#~ msgstr "参数 保持矩阵二维特性"

#~ msgid "return"
#~ msgstr "返回"

#~ msgid ""
2015 2016 2017 2018
#~ "usually the :math:`C` from an input "
#~ "of size :math:`(N, C, H, W)` or"
#~ " the highest ranked dimension of an"
#~ " input with less than 4D."
2019 2020 2021
#~ msgstr "通常 :math:`C` 是来自尺寸为 :math:`(N, C, H, W)` 的输入或小于四维的输入的最高维。"

#~ msgid ""
2022 2023 2024
#~ "a boolean value that when set to"
#~ " ``True``, this module has learnable "
#~ "affine parameters. Default: ``True``"
2025 2026 2027
#~ msgstr "当该变量设置为 ``True`` 时是一个布尔值 ,此模块具有可学习的仿射参数。 默认: ``True``"

#~ msgid ""
2028 2029 2030 2031 2032 2033 2034
#~ "when set to ``True``, this module "
#~ "tracks the running mean and variance."
#~ " When set to ``False``, this module"
#~ " does not track such statistics and"
#~ " always uses batch statistics in both"
#~ " training and eval modes. Default: "
#~ "``True``."
2035
#~ msgstr ""
2036 2037
#~ "当设置为 ``True`` 时, 该模块可以跟踪训练过程中的均值和方差。 当设置为 "
#~ "``False`` 时, 该模块不跟踪这些统计数据 "
2038 2039 2040
#~ ",并且在训练和验证模式下始终使用当前批处理的统计信息。 默认: ``True``。"

#~ msgid ""
2041 2042
#~ "Fills the 2-dimensional input "
#~ ":class:`SymbolVar` with the identity matrix."
2043
#~ msgstr "用单位矩阵填充二维输入 :class:`SymbolVar` 。"
2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072

#~ msgid "megengine.functional.external"
#~ msgstr "megengine.functional.external"

#~ msgid ""
#~ "Load a serialized Cambricon subgraph "
#~ "(i.e. cnrtModel_t) and execute the "
#~ "operations defined in the subgraph."
#~ msgstr "加载一个序列化的Cambricon子图(即cnrtModel_t),并执行在子图中定义的操作。"

#~ msgid "List of input tensors of the subgraph."
#~ msgstr "子图的输入张量列表。"

#~ msgid "The serialized subgraph."
#~ msgstr "序列化的子图。"

#~ msgid ""
#~ "The name of the function in the"
#~ " subgraph. The function is corresponding"
#~ " to a cnmlFusionOp which is added "
#~ "to the cnmlModel_t/cnrtModel_t."
#~ msgstr "子图中函数的名称。 该函数与添加到cnmlModel_t/cnrtModel_t中的cnmlFusionOp对应。"

#~ msgid "Whether the input tensors' shapes are mutalbe in cnrtModel_t"
#~ msgstr "cnrtModel_t中输入张量的形状是否是可变的(mutable)。"

#~ msgid ":py:class:`~typing.List`\\[:py:class:`~megengine.core.tensor.Tensor`]"
#~ msgstr ":py:class:`~typing.List`\\[:py:class:`~megengine.core.tensor.Tensor`]"