Ejemplo n.º 1
0
        public static Dictionary <CNTK.Variable, CNTK.Value> SetVariableValue(CNTK.Variable variable, float[] value)
        {
            CNTK.Value inputValue = null;

            if (value != null)
            {
                inputValue = CNTK.Value.CreateBatch <float>(new int[] { variable.Shape.Dimensions[0] }, value, 0, value.Length, Layers._device);
            }
            return(new Dictionary <CNTK.Variable, CNTK.Value>()
            {
                { variable, inputValue }
            });
        }