3b440235e237ef59ec5763c413e7f4292dab5d79,keras/backend/cntk_backend.py,,is_keras_tensor,#Any#,299
Before Change
def is_keras_tensor(x):
if not isinstance(x, (C.variables.Constant,
C.variables.Variable,
C.variables.Parameter,
C.ops.functions.Function)) :
raise ValueError("Unexpectedly found an instance of type `" + str(type(x)) + "`. "
"Expected a symbolic tensor instance.")
return hasattr(x, "_keras_history")
After Change
def is_keras_tensor(x):
if not is_tensor(x) :
raise ValueError("Unexpectedly found an instance of type `" +
str(type(x)) + "`. "
"Expected a symbolic tensor instance.")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances Project Name: keras-team/keras
Commit Name: 3b440235e237ef59ec5763c413e7f4292dab5d79
Time: 2018-04-26
Author: francois.chollet@gmail.com
File Name: keras/backend/cntk_backend.py
Class Name:
Method Name: is_keras_tensor
Project Name: keras-team/keras
Commit Name: 3b440235e237ef59ec5763c413e7f4292dab5d79
Time: 2018-04-26
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: is_keras_tensor
Project Name: keras-team/keras
Commit Name: 3b440235e237ef59ec5763c413e7f4292dab5d79
Time: 2018-04-26
Author: francois.chollet@gmail.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: is_keras_tensor