Skip to content

Commit 8cce330

Browse files
committed
fix error
1 parent 5a10d83 commit 8cce330

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

python/paddle/fluid/tests/book/high-level-api/understand_sentiment/test_understand_sentiment_conv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def infer(use_cuda, inference_program, save_dirname=None):
134134
lod = [[3, 4, 2]]
135135
base_shape = [1]
136136
# The range of random integers is [low, high]
137-
tensor_words = fluid.create_random_lodtensor(
137+
tensor_words = fluid.create_random_int_lodtensor(
138138
lod, base_shape, place, low=0, high=len(word_dict) - 1)
139139
results = inferencer.infer({'words': tensor_words})
140140
print("infer results: ", results)

python/paddle/fluid/tests/book/high-level-api/understand_sentiment/test_understand_sentiment_dynamic_rnn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def infer(use_cuda, inference_program, save_dirname=None):
149149
lod = [[3, 4, 2]]
150150
base_shape = [1]
151151
# The range of random integers is [low, high]
152-
tensor_words = fluid.create_random_lodtensor(
152+
tensor_words = fluid.create_random_int_lodtensor(
153153
lod, base_shape, place, low=0, high=len(word_dict) - 1)
154154
results = inferencer.infer({'words': tensor_words})
155155
print("infer results: ", results)

python/paddle/fluid/tests/book/high-level-api/understand_sentiment/test_understand_sentiment_stacked_lstm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def infer(use_cuda, inference_program, save_dirname=None):
141141
lod = [[3, 4, 2]]
142142
base_shape = [1]
143143
# The range of random integers is [low, high]
144-
tensor_words = fluid.create_random_lodtensor(
144+
tensor_words = fluid.create_random_int_lodtensor(
145145
lod, base_shape, place, low=0, high=len(word_dict) - 1)
146146
results = inferencer.infer({'words': tensor_words})
147147
print("infer results: ", results)

python/paddle/fluid/tests/book/notest_understand_sentiment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def infer(word_dict, use_cuda, save_dirname=None):
247247
lod = [[3, 4, 2]]
248248
base_shape = [1]
249249
# The range of random integers is [low, high]
250-
tensor_words = fluid.create_random_lodtensor(
250+
tensor_words = fluid.create_random_int_lodtensor(
251251
lod, base_shape, place, low=0, high=word_dict_len - 1)
252252

253253
# Construct feed as a dictionary of {feed_target_name: feed_target_data}

0 commit comments

Comments
 (0)