Unverified Commit 49382181 authored by Double_V's avatar Double_V Committed by GitHub
Browse files

Merge pull request #3717 from littletomatodonkey/dyg/fix_cls_type

fix cls type
parents ab16f2e4 66c3294c
......@@ -25,6 +25,6 @@ class ClsLoss(nn.Layer):
self.loss_func = nn.CrossEntropyLoss(reduction='mean')
def forward(self, predicts, batch):
label = batch[1]
label = batch[1].astype("int64")
loss = self.loss_func(input=predicts, label=label)
return {'loss': loss}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment