Fix thread safety of softmax prediction. (#7104)

This commit is contained in:
Jiaming Yuan
2021-07-16 02:06:55 +08:00
committed by GitHub
parent 2801d69fb7
commit abec3dbf6d
6 changed files with 20 additions and 23 deletions

View File

@@ -53,7 +53,7 @@ class ObjFunction : public Configurable {
* \brief transform prediction values, this is only called when Prediction is called
* \param io_preds prediction values, saves to this vector as well
*/
virtual void PredTransform(HostDeviceVector<bst_float>*) {}
virtual void PredTransform(HostDeviceVector<bst_float>*) const {}
/*!
* \brief transform prediction values, this is only called when Eval is called,