source/train/XModel.cpp
bool XModel::CheckParam()
{
    for (int i = 0; i < paramNum; i++) {
        XTensor * param = params[i].tensor;
        if (!param->isGrad)
            return false;
    }

    return true;
}
/* check if the parameters are well-defined for training */
check if the parameters are well-defined for training
check if the parameters are well - defined for training
bool XModel::CheckParam()
{
    for (int i = 0; i < paramNum; i++) {
        XTensor * param = params[i].tensor;
        if (!param->isGrad)
            return false;
    }
    return true;
}
bool XModel :: CheckParam ( ) { for ( int i = 0 ; i < paramNum ; i ++ ) { XTensor * param = params [ i ] . tensor ; if ( ! param -> isGrad ) return false ; } return true ; }
check if the parameters are well-defined for training
check if the parameters are well - defined for training