Skip to content

Conversation

ShawnXuan
Copy link
Contributor

No description provided.

# loss = flow.mul(log_prob * -1, onehot_label).sum(dim=-1).mean()
loss = flow._C.softmax_cross_entropy(input, onehot_label.to(dtype=input.dtype))
#loss = flow._C.softmax_cross_entropy(input, onehot_label.to(dtype=input.dtype))
loss = flow._C.cross_entropy(input, onehot_label.to(dtype=input.dtype), reduction='none')
Copy link
Contributor

Choose a reason for hiding this comment

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

loss这块确定要改吗😂(cross_entropy内部貌似包含2个oplog_softmaxnll,可能效率不一定有softmax_cross_entropy好)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

临时改的,为了能跑通,等志鹏那个开发好了,就改回来。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants