65a215646c653ab808170c8b8c10de2945262613,keras/backend/theano_backend.py,,in_top_k,#Any#Any#Any#,1496
Before Change
targets_i is within top-k values of predictions_i
predictions_top_k = T.argsort(predictions)[:, -k:]
result, _ = theano.map(lambda prediction, target: any(equal(prediction, target)), sequences=[predictions_top_k, targets])
return result
After Change
except TypeError:
return T.zeros_like(targets, dtype="int8")
if k >= int_shape(predictions)[1]:
try:
return T.ones_like(targets, dtype="bool")
except TypeError:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: keras-team/keras
Commit Name: 65a215646c653ab808170c8b8c10de2945262613
Time: 2017-04-07
Author: myutwo150@users.noreply.github.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: in_top_k
Project Name: keras-team/keras
Commit Name: 0ba6d95e768eb7a0d74a6fda3ea893e7fb2d7a67
Time: 2018-05-10
Author: rowel.atienza@gmail.com
File Name: examples/variational_autoencoder.py
Class Name:
Method Name: sampling
Project Name: keras-team/keras
Commit Name: 0ba6d95e768eb7a0d74a6fda3ea893e7fb2d7a67
Time: 2018-05-10
Author: rowel.atienza@gmail.com
File Name: examples/variational_autoencoder_deconv.py
Class Name:
Method Name: sampling