Deep learning software for Windows C# programmers.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using MyCaffe.basecode;
6using MyCaffe.param;
7using MyCaffe.common;
9namespace MyCaffe.fillers
15 public class SequenceFiller<T> : Filler<T>
16 {
24 : base(cuda, log, p)
25 {
26 }
38 public override void Fill(int nCount, long hMem, int nNumAxes = 1, int nNumOutputs = 1, int nNumChannels = 1, int nHeight = 1, int nWidth = 1)
39 {
40 m_log.CHECK(nCount > 0, "There is no data to fill!");
42 float[] rgData = m_cuda.GetMemoryFloat(hMem, nCount);
44 for (int i = 0; i < rgData.Length; i++)
45 {
46 rgData[i] = (float)m_param.value + (i * 0.01f);
47 }
49 m_cuda.SetMemory(hMem, rgData);
50 }
51 }
The Log class provides general output in text form.
Definition: Log.cs:13
void CHECK(bool b, string str)
Test a flag for true.
Definition: Log.cs:227
The CudaDnn object is the main interface to the Low-Level Cuda C++ DLL.
Definition: CudaDnn.cs:969
Abstract Filler class used to fill blobs with values.
Definition: Filler.cs:19
FillerParameter m_param
Specifies the filler parameters.
Definition: Filler.cs:31
CudaDnn< T > m_cuda
Specifies the CudaDnn instance used to communicate to the low-level Cuda Dnn DLL.
Definition: Filler.cs:23
Log m_log
Specifies the output log.
Definition: Filler.cs:27
Fills a Blob with a sequence of values x0 = c; x1 = c + 0.01...
SequenceFiller(CudaDnn< T > cuda, Log log, FillerParameter p)
override void Fill(int nCount, long hMem, int nNumAxes=1, int nNumOutputs=1, int nNumChannels=1, int nHeight=1, int nWidth=1)
Fill the memory with a sequence of values starting with the constant value.
Specifies the filler parameters used to create each Filler.
double value
Specifies the value used by 'constant' filler.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
Definition: Annotation.cs:12
The MyCaffe.common namespace contains common MyCaffe classes.
Definition: BatchInput.cs:8
The MyCaffe.fillers namespace contains all fillers including the Filler class.
The MyCaffe.param namespace contains parameters used to create models.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...
Definition: Annotation.cs:12