1 Star 0 Fork 0

zhj / GRU4Rec

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gpu_ops.py 308 Bytes
一键复制 编辑 原始数据 按行查看 历史
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 10 14:17:58 2017
@author: Balázs Hidasi
"""
import theano
from theano import tensor as T
def gpu_diag_wide(X):
E = T.eye(*X.shape)
return T.sum(X*E, axis=1)
def gpu_diag_tall(X):
E = T.eye(*X.shape)
return T.sum(X*E, axis=0)
1
https://gitee.com/hjz_666/GRU4Rec.git
git@gitee.com:hjz_666/GRU4Rec.git
hjz_666
GRU4Rec
GRU4Rec
master

搜索帮助