94dbc3042f5a85b399f5ce2859d4e8fbafd235b9,tests/keras/backend/backend_test.py,,check_two_tensor_operation,#Any#Any#Any#Any#,37
Before Change
for x, y, k in zip(x_list, y_list, backend_list):
z_list.append(k.eval(getattr(k, function_name)(x, y, **kwargs)))
for i in range(len(z_list) - 1):
assert z_list[i].shape == z_list[i + 1].shape
assert_allclose(z_list[i], z_list[i + 1], atol=1e-05)
if hasattr(z_list[i], "_keras_shape"):
assert z_list[i]._keras_shape == z_list[i].shape
def cntk_check_single_tensor_operation(function_name, input_shape, **kwargs):
val = np.random.random(input_shape) - 0.5
xtf = KTF.variable(val)
xc = KC.placeholder(input_shape)
After Change
z = cntk_func_two_tensor(function_name, x_input_shape,
y=y_input_shape, **kwargs)([xval, yval])[0]
else:
z = k.eval(getattr(k, function_name)(k.variable(xval), k.variable(yval), **kwargs))
if hasattr(z, "_keras_shape"):
assert z._keras_shape == z.shape
z_list += [z]
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: keras-team/keras
Commit Name: 94dbc3042f5a85b399f5ce2859d4e8fbafd235b9
Time: 2017-07-06
Author: me@taehoonlee.com
File Name: tests/keras/backend/backend_test.py
Class Name:
Method Name: check_two_tensor_operation
Project Name: OpenNMT/OpenNMT-py
Commit Name: b87368e1e7fd832b505db9cc08015ac7af8f95de
Time: 2016-12-23
Author: jvanamersfoort@twitter.com
File Name: VAE/main.py
Class Name:
Method Name: test
Project Name: keras-team/keras
Commit Name: 94dbc3042f5a85b399f5ce2859d4e8fbafd235b9
Time: 2017-07-06
Author: me@taehoonlee.com
File Name: tests/keras/backend/backend_test.py
Class Name:
Method Name: check_single_tensor_operation