コード例 #1
0
 public ProgressWriterVector(ProgressWriterVector other) : this(CNTKLibPINVOKE.new_ProgressWriterVector__SWIG_1(ProgressWriterVector.getCPtr(other)), true)
 {
     if (CNTKLibPINVOKE.SWIGPendingException.Pending)
     {
         throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #2
0
 public ProgressWriterVectorEnumerator(ProgressWriterVector collection)
 {
     collectionRef = collection;
     currentIndex  = -1;
     currentObject = null;
     currentSize   = collectionRef.Count;
 }
コード例 #3
0
 public void SetRange(int index, ProgressWriterVector values)
 {
     CNTKLibPINVOKE.ProgressWriterVector_SetRange(swigCPtr, index, ProgressWriterVector.getCPtr(values));
     if (CNTKLibPINVOKE.SWIGPendingException.Pending)
     {
         throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #4
0
ファイル: Learner.cs プロジェクト: nietras/CNTK
 public void AddProgressWriters(ProgressWriterVector progressWriters)
 {
     CNTKLibPINVOKE.Learner_AddProgressWriters(swigCPtr, ProgressWriterVector.getCPtr(progressWriters));
     if (CNTKLibPINVOKE.SWIGPendingException.Pending)
     {
         throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #5
0
        public static ProgressWriterVector Repeat(ProgressWriter value, int count)
        {
            global::System.IntPtr cPtr = CNTKLibPINVOKE.ProgressWriterVector_Repeat(ProgressWriter.getCPtr(value), count);
            ProgressWriterVector  ret  = (cPtr == global::System.IntPtr.Zero) ? null : new ProgressWriterVector(cPtr, true);

            if (CNTKLibPINVOKE.SWIGPendingException.Pending)
            {
                throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #6
0
        public ProgressWriterVector GetRange(int index, int count)
        {
            global::System.IntPtr cPtr = CNTKLibPINVOKE.ProgressWriterVector_GetRange(swigCPtr, index, count);
            ProgressWriterVector  ret  = (cPtr == global::System.IntPtr.Zero) ? null : new ProgressWriterVector(cPtr, true);

            if (CNTKLibPINVOKE.SWIGPendingException.Pending)
            {
                throw CNTKLibPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #7
0
        // create ProgressWriterVector with attached native progress writer
        public static ProgressWriterVector CreateVector(string path, Function network)
        {
            var       progress = new ProgressWriterVector();
            var       getV     = typeof(ProgressWriterVector).GetMethods(BindingFlags.Static | BindingFlags.NonPublic).First(m => m.Name == "getCPtr");
            HandleRef vector   = (HandleRef)(getV.Invoke(null, new object[] { progress }));

            var       getF     = typeof(Function).GetMethods(BindingFlags.Static | BindingFlags.NonPublic).First(m => m.Name == "getCPtr");
            HandleRef function = (HandleRef)(getF.Invoke(null, new object[] { network }));

            TensorBoardFileWriter.InitVec(vector.Handle, path, function.Handle);
            return(progress);
        }
コード例 #8
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ProgressWriterVector obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }