2using System.Collections.Generic;
41 base.LayerSetUp(colBottom, colTop);
58 int nCount = colTop[0].count();
59 long hBottomData = colBottom[0].gpu_data;
60 long hTopData = colTop[0].mutable_gpu_data;
62 m_cuda.copy(nCount, hBottomData, hTopData);
98 if (!rgbPropagateDown[0])
101 int nCount = colTop[0].count();
102 long hTopDiff = colTop[0].gpu_diff;
103 long hBottomDiff = colBottom[0].mutable_gpu_diff;
105 m_cuda.copy(nCount, hTopDiff, hBottomDiff);
The Log class provides general output in text form.
The BlobCollection contains a list of Blobs.
The CudaDnn object is the main interface to the Low-Level Cuda C++ DLL.
LayerParameter m_param
Specifies the LayerParameter describing the Layer.
bool m_bUseHalfSize
Specifies that the half size of the top (if any) should be converted to the base size.
CudaDnn< T > m_cuda
Specifies the CudaDnn connection to Cuda.
LayerParameter.LayerType m_type
Specifies the Layer type.
The NeuronLayer is an interface for layers that take one blob as input (x) and produce only equally-s...
The ScalarLayer computes the operation with the value on the input.
override void backward(BlobCollection< T > colTop, List< bool > rgbPropagateDown, BlobCollection< T > colBottom)
Reverses the previous scalar operation.
override void forward(BlobCollection< T > colBottom, BlobCollection< T > colTop)
Computes
ScalarLayer(CudaDnn< T > cuda, Log log, LayerParameter p)
The ScalarLayer constructor.
override void LayerSetUp(BlobCollection< T > colBottom, BlobCollection< T > colTop)
Setup the layer.
Specifies the base parameter for all layers.
bool use_halfsize
Specifies whether or not to use half sized memory or not.
ScalarParameter scalar_param
Returns the parameter set when initialized with LayerType.SCALAR
LayerType
Specifies the layer type.
Specifies the parameters for the ScalarLayer
double value
Specifies the scalar value to apply.
ScalarOp operation
Specifies the scalar operation to apply (mul, add, etc).
bool passthrough_gradient
Specifies whether or not to pass-through the gradient without performing the back-prop calculation (d...
ScalarOp
Defines the scalar operations that may be performed.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.common namespace contains common MyCaffe classes.
The MyCaffe.layers.nt namespace contains all Neural Transfer related layers.
The MyCaffe.layers namespace contains all layers that have a solidified code base,...
The MyCaffe.param.nt namespace defines the parameters used by the Nerual Style Transfer layers.
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-...