Skip to content

Common Functions

get_devices

softneuro.get_devices()

Returns all supported devices as a dictionary.

Returns

Type : dict,a dictionary of all supported devices.

Examples

>>>devices = softneuro.get_devices()
>>>devices
{'cpu': Device(name='cpu')}           

get_layers

softneuro.get_layers()

Returns all supported layer names in the API.

Returns

Type : list,a list of all supported layer names.

Examples

>>>layers = softneuro.get_layers()
>>>layers
('abs','acos','acosh',...,'where','zero_padding2')            

get_plugins

softneuro.get_plugins()

Returns all installed plugin names and their description as a Dictionary.

Returns

Type : dict,a dictionary of all installed plugin names and their description.

Examples

>>>plugins = softneuro.get_plugins()
>>>plugins
{'plugin_avx2': 'AVX routines.'}

get_routines

softneuro.get_routines()

Returns all supported routine names for each layer as a Dictionary.

Returns

Type : dict,a dictionary of all supported routine names for each layer.

Examples

>>>routines = softneuro.get_routines()
>>>routines
{'abs': ('cpu:chf/naive', 'cpu/naive'),'acos': ('cpu:chf/naive', 'cpu/naive'),...,
'where': ('cpu/naive',),'zero_padding2': ('cpu/naive',)}
>>>conv2_routines = routines['conv2']
>>>conv2_routines
('cpu/naive','cpu/naive/wg2','cpu:chf/naive',...,'cpu:qint8:pt_asym/woc64_avx')

get_routine_schemas

softneuro.get_routine_schemas()

Returns all supported routine schemas.

Returns

Type : list,a list of all supported routine schemas.

Examples

>>>schemas = softneuro.get_routine_schemas()
>>>schemas
('cpu', 'cpu:qint8')           

set_log_level

softneuro.set_log_level(log_level)

Sets level of logging.

Arguments

  • log_level: Level of logging, defined by LogLevel.