tools.py 文件源码

python
阅读 38 收藏 0 点赞 0 评论 0

项目:structured-output-ae 作者: sbelharbi 项目源码 文件源码
def sharedX_mtx(mtx, name=None, borrow=None, dtype=None):
    """Share a matrix value with type theano.confgig.floatX.
    Parameters:
        value: matrix array
        name: variable name (str)
        borrow: boolean
        dtype: the type of the value when shared. default: theano.config.floatX
    """
    if dtype is None:
        dtype = theano.config.floatX
    return theano.shared(
        np.array(mtx, dtype=dtype), name=name, borrow=borrow)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号