e666da279a878b3f1fe2969363cc5d6fa8d5408d,base.py,TFBaseModel,test_on_batch,#TFBaseModel#,222
Before Change
evaluate sum of batch loss
feed_dict_ = {self._get_input_data() : x,
self._get_input_target(): y, self.train_flag: False}
loss = self.sess.run(self.metric_list, feed_dict=feed_dict_)
return loss[0]
After Change
evaluate sum of batch loss
feed_dict_ = {self._get_input_target(): y, self.train_flag: False,
self.sample_weight: np.ones(y.shape[0])}
input_data = self._get_input_data()
if isinstance(input_data, list):
for i in range(len(input_data)):
feed_dict_[input_data[i]] = x[i]
else:
feed_dict_[input_data] = x
score = self.sess.run(self.metric_list, feed_dict=feed_dict_)
if class_weight is None and sample_weight is None:
return np.mean(score[0])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances Project Name: shenweichen/DeepCTR
Commit Name: e666da279a878b3f1fe2969363cc5d6fa8d5408d
Time: 2018-01-15
Author: last.fantasy@qq.com
File Name: base.py
Class Name: TFBaseModel
Method Name: test_on_batch
Project Name: shenweichen/DeepCTR
Commit Name: e666da279a878b3f1fe2969363cc5d6fa8d5408d
Time: 2018-01-15
Author: last.fantasy@qq.com
File Name: base.py
Class Name: TFBaseModel
Method Name: predict_on_batch
Project Name: shenweichen/DeepCTR
Commit Name: e666da279a878b3f1fe2969363cc5d6fa8d5408d
Time: 2018-01-15
Author: last.fantasy@qq.com
File Name: base.py
Class Name: TFBaseModel
Method Name: train_on_batch