Skip to content

Commit

Permalink
Merge pull request #303 from ufal/ratpred
Browse files Browse the repository at this point in the history
Fixes to SequenceClassifier
  • Loading branch information
jindrahelcl authored Feb 4, 2017
2 parents b95951e + 9700d38 commit 2806e7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions neuralmonkey/decoders/sequence_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def __init__(self,

self.decoded_seq = [mlp.classification]
self.decoded_logits = [mlp.logits]
self.runtime_logprobs = [tf.nn.log_softmax(mlp.logits)]

tf.scalar_summary(
'val_optimization_cost', self.cost,
Expand Down
3 changes: 2 additions & 1 deletion neuralmonkey/nn/mlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def __init__(self, mlp_input, layer_configuration, dropout_plc,
"W_out", shape=[last_layer_size, output_size])

b_out = tf.get_variable(
"b_out", tf.zeros_initializer([output_size]))
"b_out",
initializer=tf.zeros_initializer([output_size]))

self.logits = tf.matmul(last_layer, w_out) + b_out

Expand Down

0 comments on commit 2806e7b

Please sign in to comment.