UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead

The reduction argument was recently introduced in 0.4.1.
See e.g. the docs for nn.CrossEntropyLoss.

It’s currently just a warning that you are using deprecated arguments, so you should definitely use reduction instead of reduce or size_average.

6 Likes