e605d5b1621d118435e23a15bedc31754b9a2b3b,src/model_fn.py,,model_fn,#Any#Any#Any#,81
Before Change
logits,sequence_length,label,length)
//Create homogeneity among the return values
global_step = tf.convert_to_tensor(
tf.train.get_or_create_global_step())
global_step = tf.cast(global_step, tf.float32)
sequence_error = tf.cast(sequence_error, tf.float32)
//Get the correct format to pass to estimator spec
result = tf.convert_to_tensor([(tf.stack([global_step,
loss,
label_error,
sequence_error], axis=0))])
return tf.estimator.EstimatorSpec(mode=mode, loss=loss,
predictions=result,
train_op=None)
After Change
return tf.estimator.EstimatorSpec(mode=mode,
loss=loss,
eval_metric_ops=
{"label_error":
metric_fn(label_error),
"sequence_error":
seq_err_metric_fn(sequence_error)},
train_op=None)
def label_err_metric_fn(label_error):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: weinman/cnn_lstm_ctc_ocr
Commit Name: e605d5b1621d118435e23a15bedc31754b9a2b3b
Time: 2018-07-09
Author: am.lamsal@gmail.com
File Name: src/model_fn.py
Class Name:
Method Name: model_fn
Project Name: weinman/cnn_lstm_ctc_ocr
Commit Name: e605d5b1621d118435e23a15bedc31754b9a2b3b
Time: 2018-07-09
Author: am.lamsal@gmail.com
File Name: src/model_fn.py
Class Name:
Method Name: model_fn
Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 8b9acc51a5e27378a6b337018480ff9434bbf6f8
Time: 2018-05-17
Author: igor.a.gitman@gmail.com
File Name: open_seq2seq/models/seq2seq.py
Class Name: Seq2Seq
Method Name: _build_forward_pass_graph
Project Name: analysiscenter/batchflow
Commit Name: 7fd49e352027b5e24d0f8ede917877e5d5ef945f
Time: 2017-11-10
Author: rhudor@gmail.com
File Name: dataset/models/tf/vgg.py
Class Name: VGG
Method Name: _build