Skip to content

Commit

Permalink
fix paddle/understand_sentiment_dynamic_lstm.py (the size of last bat…
Browse files Browse the repository at this point in the history
…ch is smaller than batch_size )
  • Loading branch information
chengduoZH committed Dec 12, 2017
1 parent d3b8e07 commit b3584a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/understand_sentiment_dynamic_lstm.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def run_benchmark(model, args):
tensor_words = to_lodtensor(map(lambda x: x[0], data), place)

label = np.array(map(lambda x: x[1], data)).astype("int64")
label = label.reshape([args.batch_size, 1])
label = label.reshape([len(data), 1])

tensor_label = fluid.LoDTensor()
tensor_label.set(label, place)
Expand Down

0 comments on commit b3584a7

Please sign in to comment.