前言
SMLQTK是一个 Python 工具包,用于基于多媒体的机器学习中可插入式的算法和数据结构。
SMQTK 的 API 提供:
示例代码:
import abc
from smqtk.representation import SmqtkRepresentation
from smqtk.utils.plugin import Pluggable, get_plugins
class FooBar (SmqtkRepresentation, Pluggable):
"""
Some documentation on what this does.
"""
# Interface methods and/or abstract functionality here.
# -> See the abc module on how to decorate abstract methods.
@abc.abstractmethod
def do_something(self):
""" Does Something """
def get_foo_bar_impls(reload_modules=False):
import os.path as osp
from smqtk.utils.plugin import get_plugins
this_dir = osp.abspath(osp.dirname(__file__))
env_var = 'FOO_BAR_PATH'
helper_var = 'FOO_BAR_CLASS'
return get_plugins(__name__, this_dir, env_var, helper_var, FooBar,
reload_modules)
小编推荐一个学python的学习qun 740,3222,34
无论你是大牛还是小白,是想转行还是想入行都可以来了解一起进步一起学习!裙内有开发工具,很多干货和技术资料分享!