Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1032942

Browse filesBrowse files
fix output dimension error
1 parent 8f5628d commit 1032942
Copy full SHA for 1032942

1 file changed

+1-1Lines changed: 1 addition & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎python/dnlp/core/dnn_crf.py‎

Copy file name to clipboardExpand all lines: python/dnlp/core/dnn_crf.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, *, config: DnnCrfConfig = None, data_path: str = '', dtype: t
4545
self.output = self.get_output_layer(self.hidden_layer)
4646

4747
if mode == 'predict':
48-
self.output = tf.squeeze(self.output, axis=2)
48+
self.output = tf.squeeze(tf.transpose(self.output), axis=2)
4949
elif train == 'll':
5050
self.ll_loss, _ = tf.contrib.crf.crf_log_likelihood(self.output, self.real_indices, self.seq_length,
5151
self.transition)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.