本文整理汇总了Python中theano.gof.COp类的典型用法代码示例。如果您正苦于以下问题:Python COp类的具体用法?Python COp怎么用?Python COp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了COp类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, relu=False, inplace=False):
COp.__init__(self, ["gemm16.c"], "gemm16")
self.relu = relu
# relu = True will require more work in optimizations.
assert self.relu is False
self.inplace = inplace
if self.inplace:
self.destroy_map = {0: [0]}
开发者ID:huamichaelchen,项目名称:Theano,代码行数:8,代码来源:nerv.py
示例2: __init__
def __init__(self, inplace=False):
theano_cuda_dir = os.path.dirname(theano.sandbox.cuda.__file__)
COp.__init__(self, ["dnn_base.c",
os.path.join(theano_cuda_dir,"dnn_conv_base.c"),
"dnn_gi.c"],
"APPLY_SPECIFIC(conv_gi)")
self.inplace = inplace
if self.inplace:
self.destroy_map = {0: [2]}
开发者ID:robintibor,项目名称:pylearn3dconv,代码行数:9,代码来源:conv.py
示例3: __init__
def __init__(self, border_mode, subsample=(1, 1), conv_mode='conv'):
COp.__init__(self, ["conv_desc.c"], "APPLY_SPECIFIC(conv_desc)")
if isinstance(border_mode, int):
border_mode = (border_mode,) * len(subsample)
if isinstance(border_mode, tuple):
assert len(border_mode) == len(subsample)
border_mode = tuple(map(int, border_mode))
if not ((isinstance(border_mode, tuple) and min(border_mode) >= 0) or
border_mode in ('valid', 'full')):
raise ValueError(
'invalid border_mode {}, which must be either '
'"valid", "full", an integer or a pair of'
' integers'.format(border_mode))
self.border_mode = border_mode
assert len(subsample) in (2, 3)
self.subsample = subsample
assert conv_mode in ('conv', 'cross')
self.conv_mode = conv_mode
开发者ID:hfinger,项目名称:Theano,代码行数:19,代码来源:dnn.py
示例4: __init__
def __init__(self):
COp.__init__(self, "dnn_base.c")
开发者ID:c0g,项目名称:Theano,代码行数:2,代码来源:dnn.py
示例5: __init__
def __init__(self, complete=True):
self.complete = complete
COp.__init__(self, ['c_code/magma_qr.c'], 'APPLY_SPECIFIC(magma_qr)')
开发者ID:Theano,项目名称:Theano,代码行数:3,代码来源:linalg.py
示例6: __init__
def __init__(self, inplace=False):
COp.__init__(self, "blockgemv.c", "APPLY_SPECIFIC(blockgemv)")
self.inplace = inplace
if self.inplace:
self.destroy_map = {0: [0]}
开发者ID:ADNbox,项目名称:Theano,代码行数:5,代码来源:blocksparse.py
示例7: __init__
def __init__(self, inplace=False):
COp.__init__(self, ["c_code/blockger.c"], "APPLY_SPECIFIC(blockger)")
self.inplace = inplace
if self.inplace:
self.destroy_map = {0: [0]}
开发者ID:DEVESHTARASIA,项目名称:Theano,代码行数:5,代码来源:blocksparse.py
示例8: __init__
def __init__(self, ...):
COp.__init__(self, c_files, func_name)
开发者ID:abergeron,项目名称:ccw_tutorial_theano,代码行数:2,代码来源:cop.py
示例9: __init__
def __init__(self):
COp.__init__(self, ["doublecop.c"],
"APPLY_SPECIFIC(doublecop)")
开发者ID:abergeron,项目名称:ccw_tutorial_theano,代码行数:3,代码来源:doublecop.py
示例10: __init__
def __init__(self):
COp.__init__(self, ['GruOp.cu'],
'APPLY_SPECIFIC(gated_unit_main_2)')
开发者ID:caomw,项目名称:MLFun,代码行数:3,代码来源:GruOp.py
注:本文中的theano.gof.COp类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论