Skip to content

Commit 6fe0581

Browse files
committed
optimize code
1 parent b546153 commit 6fe0581

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

python/paddle/v2/framework/tests/test_image_classification_train.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,13 @@ def conv_block(input,
189189
data_type='int64',
190190
program=program,
191191
init_program=init_program)
192-
# net = vgg16_bn_drop(images, program, init_program)
192+
193+
# Add neural network config
194+
# option 1. resnet
193195
net = resnet_cifar10(images, 32, program, init_program)
196+
# option 2. vgg
197+
# net = vgg16_bn_drop(images, program, init_program)
198+
194199
# print(program)
195200

196201
predict = layers.fc(input=net,
@@ -244,7 +249,7 @@ def conv_block(input,
244249
" loss:" + str(loss))
245250
batch_id = batch_id + 1
246251

247-
if batch_id > 10:
252+
if batch_id > 1:
248253
# this model is slow, so if we can train two mini batch, we think it works properly.
249254
exit(0)
250255
exit(1)

0 commit comments

Comments
 (0)