當前位置: 首頁>>代碼示例>>Python>>正文


Python COp.__init__方法代碼示例

本文整理匯總了Python中theano.gof.COp.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python COp.__init__方法的具體用法?Python COp.__init__怎麽用?Python COp.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在theano.gof.COp的用法示例。


在下文中一共展示了COp.__init__方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
 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,代碼行數:10,代碼來源:nerv.py

示例2: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
 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,代碼行數:11,代碼來源:conv.py

示例3: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
    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,代碼行數:21,代碼來源:dnn.py

示例4: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
 def __init__(self):
     COp.__init__(self, "dnn_base.c")
開發者ID:c0g,項目名稱:Theano,代碼行數:4,代碼來源:dnn.py

示例5: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
 def __init__(self, complete=True):
     self.complete = complete
     COp.__init__(self, ['c_code/magma_qr.c'], 'APPLY_SPECIFIC(magma_qr)')
開發者ID:Theano,項目名稱:Theano,代碼行數:5,代碼來源:linalg.py

示例6: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
 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,代碼行數:7,代碼來源:blocksparse.py

示例7: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
 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,代碼行數:7,代碼來源:blocksparse.py

示例8: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
 def __init__(self, ...):
     COp.__init__(self, c_files, func_name)
開發者ID:abergeron,項目名稱:ccw_tutorial_theano,代碼行數:4,代碼來源:cop.py

示例9: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
 def __init__(self):
     COp.__init__(self, ["doublecop.c"],
                  "APPLY_SPECIFIC(doublecop)")
開發者ID:abergeron,項目名稱:ccw_tutorial_theano,代碼行數:5,代碼來源:doublecop.py

示例10: __init__

# 需要導入模塊: from theano.gof import COp [as 別名]
# 或者: from theano.gof.COp import __init__ [as 別名]
 def __init__(self):
     COp.__init__(self, ['GruOp.cu'],
             'APPLY_SPECIFIC(gated_unit_main_2)')
開發者ID:caomw,項目名稱:MLFun,代碼行數:5,代碼來源:GruOp.py


注:本文中的theano.gof.COp.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。