Skip to content

Commit

Permalink
More comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei06 committed Oct 26, 2016
1 parent dcb5bfe commit 1a5927e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demo/quick_start/api_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ def main():
trainer_config.ClearField('data_config')
trainer_config.ClearField('test_data_config')

# create a GradientMachine from the model configuratin
model = api.GradientMachine.createFromConfigProto(
trainer_config.model_config)
# create a trainer for the gradient machine
trainer = api.Trainer.create(trainer_config, model)

# create a data converter which converts data to PaddlePaddle
# internal format
input_types = [
integer_value_sequence(len(word_dict)) if options.seq
else sparse_binary_vector(len(word_dict)),
Expand Down

0 comments on commit 1a5927e

Please sign in to comment.