public static NNEvaluatorDef SingleNet(string netID, NNEvaluatorType evaluatorType, NNEvaluatorPrecision precision, params int[] gpuIDs) { NNEvaluatorDeviceDef[] devices = new NNEvaluatorDeviceDef[gpuIDs.Length]; for (int i = 0; i < gpuIDs.Length; i++) { devices[i] = new NNEvaluatorDeviceDef(NNDeviceType.GPU, gpuIDs[i]); } NNEvaluatorDeviceComboType type = gpuIDs.Length == 1 ? NNEvaluatorDeviceComboType.Single : NNEvaluatorDeviceComboType.Split; return(new NNEvaluatorDef(new NNEvaluatorNetDef(netID, evaluatorType, precision), type, devices)); }
public static NNEvaluatorDef SingleNet(string netID, NNEvaluatorType evaluatorType, params (int GPUID, float Fraction)[] gpuIDAndFractions)
public static NNEvaluatorDef SingleNet(string netID, NNEvaluatorType evaluatorType, params int[] gpuIDs) { return(SingleNet(netID, evaluatorType, NNEvaluatorPrecision.FP16, gpuIDs)); }