c2244d2a4cb5f86968fb117f75469283a19b8a24,tests/keras/backend/backend_test.py,TestBackend,test_sparse_dot,#TestBackend#,1832
Before Change
W = np.random.random((5, 4))
// cntk not support it yet
backends = [KTF]
if KTH.th_sparse_module:
// Theano has some dependency issues for sparse
backends.append(KTH)
After Change
x_dense = x_sparse.toarray()
W = np.random.random((5, 4))
t_W = K.variable(W)
k_s = K.eval(K.dot(K.variable(x_sparse), t_W))
k_d = K.eval(K.dot(K.variable(x_dense), t_W))
assert k_s.shape == k_d.shape
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: keras-team/keras
Commit Name: c2244d2a4cb5f86968fb117f75469283a19b8a24
Time: 2018-10-21
Author: gabrieldemarmiesse@gmail.com
File Name: tests/keras/backend/backend_test.py
Class Name: TestBackend
Method Name: test_sparse_dot
Project Name: keras-team/keras
Commit Name: 874f6db89d70b3c0221034943b2a427d88b63e81
Time: 2018-10-14
Author: gabrieldemarmiesse@gmail.com
File Name: tests/keras/backend/backend_test.py
Class Name: TestBackend
Method Name: test_logsumexp_optim
Project Name: keras-team/keras
Commit Name: ae72ea0bfe7f7041d6f7580427fa1f69158bab7e
Time: 2018-03-05
Author: me@taehoonlee.com
File Name: tests/keras/backend/backend_test.py
Class Name: TestBackend
Method Name: test_rnn_no_states