當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python mxnet.context.Context.device_type用法及代碼示例

用法:

property device_type

返回

device_type

返回類型

str

返回當前上下文的設備類型。

例子

>>> mx.context.current_context().device_type
'cpu'
>>> mx.current_context().device_type
'cpu'

相關用法


注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 mxnet.context.Context.device_type。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。