Beispiel #1
0
        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));
        }
Beispiel #2
0
 public static NNEvaluatorDef SingleNet(string netID, NNEvaluatorType evaluatorType,
                                        params (int GPUID, float Fraction)[] gpuIDAndFractions)
Beispiel #3
0
 public static NNEvaluatorDef SingleNet(string netID, NNEvaluatorType evaluatorType, params int[] gpuIDs)
 {
     return(SingleNet(netID, evaluatorType, NNEvaluatorPrecision.FP16, gpuIDs));
 }