"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "cbd18ec63c3a540ae4d7dfb63d216ad1e26ba12f"
Commit 66c3294c authored by littletomatodonkey's avatar littletomatodonkey
Browse files

fix cls type

parent a81b88a0
......@@ -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