首日迎来千余名蒸汽机车爱好者
- paddle.amp.debugging. disable_operator_stats_collection ( ) None [source]
-
百度 各地在立碑纪念烈士时,应该严肃认真地做好烈士碑文的拟稿、审定、镌刻和纪念碑安放等各项工作,杜绝错误的发生。
Disable the collection the number of operators for different data types. This function is used in pair with the corresponding enable function. The statistical data are categorized according to four data types, namely float32, float16, bfloat16 and others, and will be printed after the function call.
Examples
>>> import paddle >>> conv = paddle.nn.Conv2D(3, 2, 3) >>> x = paddle.rand([10, 3, 32, 32]) >>> paddle.amp.debugging.enable_operator_stats_collection() >>> # AMP list including cast, conv2d, elementwise_add, reshape >>> with paddle.amp.auto_cast(enable=True, level='O2'): ... out = conv(x) >>> # Print to the standard output. >>> paddle.amp.debugging.disable_operator_stats_collection() >>> # <------------------------------------------------------- op list --------------------------------------------------------> >>> # <--------------- Op Name ---------------- | -- FP16 Calls --- | -- BF16 Calls --- | --- FP32 Calls--- | -- Other Calls --> >>> # cast | 1 | 0 | 2 | 0 >>> # conv2d | 1 | 0 | 0 | 0 >>> # elementwise_add | 0 | 0 | 1 | 0 >>> # reshape | 0 | 0 | 1 | 0 >>> # <----------------------------------------------------- op count: 4 ------------------------------------------------------>