public void ChangeDevice(DeviceDescriptor device) { CNTKLibPINVOKE.NDArrayView_ChangeDevice(swigCPtr, DeviceDescriptor.getCPtr(device)); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
public static bool TrySetDefaultDevice(DeviceDescriptor newDefaultDevice) { bool ret = CNTKLibPINVOKE.DeviceDescriptor_TrySetDefaultDevice__SWIG_1(DeviceDescriptor.getCPtr(newDefaultDevice)); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public NDArrayView(DataType dataType, NDShape viewShape, int[] colStarts, int[] rowIndices, SWIGTYPE_p_void nonZeroValues, uint numNonZeroValues, DeviceDescriptor device) : this(CNTKLibPINVOKE.new_NDArrayView__SWIG_1((int)dataType, NDShape.getCPtr(viewShape), colStarts, rowIndices, SWIGTYPE_p_void.getCPtr(nonZeroValues), numNonZeroValues, DeviceDescriptor.getCPtr(device)), true) { if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
private static Value _CreateSequenceDouble(NDShape sampleShape, double[] dataBuffer, int dataSize, bool sequenceStartFlag, DeviceDescriptor device) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__CreateSequenceDouble__SWIG_1(NDShape.getCPtr(sampleShape), dataBuffer, dataSize, sequenceStartFlag, DeviceDescriptor.getCPtr(device)); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static NDArrayView _RandomUniformDouble(NDShape shape, double rangeStart, double rangeEnd, uint seed, DeviceDescriptor device) { global::System.IntPtr cPtr = CNTKLibPINVOKE.NDArrayView__RandomUniformDouble(NDShape.getCPtr(shape), rangeStart, rangeEnd, seed, DeviceDescriptor.getCPtr(device)); NDArrayView ret = (cPtr == global::System.IntPtr.Zero) ? null : new NDArrayView(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Constant _ScalarDouble(double value, DeviceDescriptor device) { Constant ret = new Constant(CNTKLibPINVOKE.Constant__ScalarDouble__SWIG_0(value, DeviceDescriptor.getCPtr(device)), true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static Constant Scalar(DataType dataType, double value, DeviceDescriptor device) { Constant ret = new Constant(CNTKLibPINVOKE.Constant_Scalar__SWIG_0((int)dataType, value, DeviceDescriptor.getCPtr(device)), true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public double TestMinibatch(UnorderedMapVariableValuePtr arguments, DeviceDescriptor computeDevice) { double ret = CNTKLibPINVOKE.Evaluator_TestMinibatch__SWIG_4(swigCPtr, UnorderedMapVariableValuePtr.getCPtr(arguments), DeviceDescriptor.getCPtr(computeDevice)); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Value _CreateOneHotFloat(uint dimension, SizeTVectorVector oneHotSequences, DeviceDescriptor device) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__CreateOneHotFloat__SWIG_5(dimension, SizeTVectorVector.getCPtr(oneHotSequences), DeviceDescriptor.getCPtr(device)); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Value _CreateSequenceDouble(uint dimension, uint sequenceLength, int[] colStarts, int[] rowIndices, double[] nonZeroValues, uint numNonZeroValues, bool sequenceStartFlag, DeviceDescriptor device) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__CreateSequenceDouble__SWIG_7(dimension, sequenceLength, colStarts, rowIndices, nonZeroValues, numNonZeroValues, sequenceStartFlag, DeviceDescriptor.getCPtr(device)); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public NDArrayView DeepClone(DeviceDescriptor device) { global::System.IntPtr cPtr = CNTKLibPINVOKE.NDArrayView_DeepClone__SWIG_1(swigCPtr, DeviceDescriptor.getCPtr(device)); NDArrayView ret = (cPtr == global::System.IntPtr.Zero) ? null : new NDArrayView(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Value _CreateSequenceFloat(NDShape sampleShape, uint sequenceLength, int[] colStarts, int[] rowIndices, float[] nonZeroValues, uint numNonZeroValues, bool sequenceStartFlag, DeviceDescriptor device, bool readOnly) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__CreateSequenceFloat__SWIG_4(NDShape.getCPtr(sampleShape), sequenceLength, colStarts, rowIndices, nonZeroValues, numNonZeroValues, sequenceStartFlag, DeviceDescriptor.getCPtr(device), readOnly); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Value _Create(NDShape sampleShape, NDArrayViewPtrVector sequences, BoolVector sequenceStartFlags, DeviceDescriptor device) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__Create__SWIG_6(NDShape.getCPtr(sampleShape), NDArrayViewPtrVector.getCPtr(sequences), BoolVector.getCPtr(sequenceStartFlags), DeviceDescriptor.getCPtr(device)); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Value _CreateSequenceDouble(uint dimension, SizeTVector sequenceData, bool sequenceStartFlag, DeviceDescriptor device) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__CreateSequenceDouble__SWIG_3(dimension, SizeTVector.getCPtr(sequenceData), sequenceStartFlag, DeviceDescriptor.getCPtr(device)); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Value _CreateBatchDouble(uint dimension, SizeTVector batchData, DeviceDescriptor device, bool readOnly) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__CreateBatchDouble__SWIG_2(dimension, SizeTVector.getCPtr(batchData), DeviceDescriptor.getCPtr(device), readOnly); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Value _CreateOneHotDouble(uint dimension, SizeTVectorVector oneHotSequences, BoolVector sequenceStartFlags, DeviceDescriptor device, bool readOnly) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__CreateOneHotDouble__SWIG_6(dimension, SizeTVectorVector.getCPtr(oneHotSequences), BoolVector.getCPtr(sequenceStartFlags), DeviceDescriptor.getCPtr(device), readOnly); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public NDArrayView(DataType dataType, NDShape viewShape, DeviceDescriptor device) : this(CNTKLibPINVOKE.new_NDArrayView__SWIG_3((int)dataType, NDShape.getCPtr(viewShape), DeviceDescriptor.getCPtr(device)), true) { if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
public Parameter(NDShape shape, DataType dataType, CNTKDictionary initializer, DeviceDescriptor device) : this(CNTKLibPINVOKE.new_Parameter__SWIG_9(NDShape.getCPtr(shape), (int)dataType, CNTKDictionary.getCPtr(initializer), DeviceDescriptor.getCPtr(device)), true) { if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
public double TestMinibatch(UnorderedMapVariableMinibatchData arguments, UnorderedMapVariableValuePtr outputsToFetch, DeviceDescriptor computeDevice, bool distributed) { double ret = CNTKLibPINVOKE.Evaluator_TestMinibatch__SWIG_6(swigCPtr, UnorderedMapVariableMinibatchData.getCPtr(arguments), UnorderedMapVariableValuePtr.getCPtr(outputsToFetch), DeviceDescriptor.getCPtr(computeDevice), distributed); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Function _Load(byte[] buffer, uint length, DeviceDescriptor computeDevice) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Function__Load__SWIG_4(buffer, length, DeviceDescriptor.getCPtr(computeDevice)); Function ret = (cPtr == global::System.IntPtr.Zero) ? null : new Function(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Parameter(NDShape shape, DataType dataType, double initValue, DeviceDescriptor device, string name) : this(CNTKLibPINVOKE.new_Parameter__SWIG_5(NDShape.getCPtr(shape), (int)dataType, initValue, DeviceDescriptor.getCPtr(device), name), true) { if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
private static Value _CreateOneHotDouble(NDShape sampleShape, SizeTVectorVector oneHotSequences, DeviceDescriptor device) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__CreateOneHotDouble__SWIG_1(NDShape.getCPtr(sampleShape), SizeTVectorVector.getCPtr(oneHotSequences), DeviceDescriptor.getCPtr(device)); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Function _Load(string filepath, DeviceDescriptor computeDevice, ModelFormat format) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Function__Load__SWIG_0(filepath, DeviceDescriptor.getCPtr(computeDevice), (int)format); Function ret = (cPtr == global::System.IntPtr.Zero) ? null : new Function(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public NDArrayView(NDShape viewShape, double[] dataBuffer, uint numBufferElements, DeviceDescriptor device) : this(CNTKLibPINVOKE.new_NDArrayView__SWIG_17(NDShape.getCPtr(viewShape), dataBuffer, numBufferElements, DeviceDescriptor.getCPtr(device)), true) { if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
private void _Evaluate(UnorderedMapVariableValuePtr arguments, UnorderedMapVariableValuePtr outputs, DeviceDescriptor computeDevice) { CNTKLibPINVOKE.Function__Evaluate__SWIG_0(swigCPtr, UnorderedMapVariableValuePtr.getCPtr(arguments), UnorderedMapVariableValuePtr.getCPtr(outputs), DeviceDescriptor.getCPtr(computeDevice)); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
public NDArrayView(NDShape viewShape, int[] colStarts, int[] rowIndices, double[] nonZeroValues, uint numNonZeroValues, DeviceDescriptor device) : this(CNTKLibPINVOKE.new_NDArrayView__SWIG_21(NDShape.getCPtr(viewShape), colStarts, rowIndices, nonZeroValues, numNonZeroValues, DeviceDescriptor.getCPtr(device)), true) { if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
public Constant(NDShape shape, DataType dataType, double initValue, DeviceDescriptor device) : this(CNTKLibPINVOKE.new_Constant__SWIG_6(NDShape.getCPtr(shape), (int)dataType, initValue, DeviceDescriptor.getCPtr(device)), true) { if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
public NDArrayView(NDShape viewShape, int[] colStarts, int[] rowIndices, SWIGTYPE_p_int16_t nonZeroValues, uint numNonZeroValues, DeviceDescriptor device, bool readOnly) : this(CNTKLibPINVOKE.new_NDArrayView__SWIG_24(NDShape.getCPtr(viewShape), colStarts, rowIndices, SWIGTYPE_p_int16_t.getCPtr(nonZeroValues), numNonZeroValues, DeviceDescriptor.getCPtr(device), readOnly), true) { if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } }
private static NDArrayView _RandomNormalFloat(NDShape shape, double mean, double stdDev, uint seed, DeviceDescriptor device) { global::System.IntPtr cPtr = CNTKLibPINVOKE.NDArrayView__RandomNormalFloat(NDShape.getCPtr(shape), mean, stdDev, seed, DeviceDescriptor.getCPtr(device)); NDArrayView ret = (cPtr == global::System.IntPtr.Zero) ? null : new NDArrayView(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private static Value _CreateBatchFloat(NDShape sampleShape, float[] dataBuffer, int dataStart, int dataSize, DeviceDescriptor device, bool readOnly) { global::System.IntPtr cPtr = CNTKLibPINVOKE.Value__CreateBatchFloat__SWIG_0(NDShape.getCPtr(sampleShape), dataBuffer, dataStart, dataSize, DeviceDescriptor.getCPtr(device), readOnly); Value ret = (cPtr == global::System.IntPtr.Zero) ? null : new Value(cPtr, true); if (CNTKLibPINVOKE.SWIGPendingException.Pending) { throw CNTKLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }