Skip to content

Conversation

@abhinavarora
Copy link
Contributor

@abhinavarora abhinavarora commented May 2, 2018

Once this PR is approved, I will add other book examples for understanding sentiment using other models.


place = fluid.CUDAPlace(0) if use_cuda else fluid.CPUPlace()
trainer = fluid.Trainer(
partial(train_network, word_dict),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of partial. But probably we will have to think about how the Trainer API will parse both functions and functools.partial objects (for any use case except calling them).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@sidgoyal78 sidgoyal78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. Probably, @helinwang or @cs2be can also take a look.

@abhinavarora abhinavarora merged commit 3000e99 into PaddlePaddle:develop May 3, 2018
@abhinavarora abhinavarora deleted the understand_sentiment_new_api branch May 3, 2018 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants