@Name(value="caffe::ContrastiveLossLayer<double>") @NoOffset @Properties(inherit=caffe.class) public class DoubleContrastiveLossLayer extends DoubleLossLayer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
DoubleContrastiveLossLayer(LayerParameter param) |
DoubleContrastiveLossLayer(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
AllowForceBackward(int bottom_index)
Unlike most loss layers, in the ContrastiveLossLayer we can backpropagate
to the first two inputs.
|
protected void |
Backward_cpu(DoubleBlobVector top,
BoolVector propagate_down,
DoubleBlobVector bottom) |
protected void |
Backward_gpu(DoubleBlobVector top,
BoolVector propagate_down,
DoubleBlobVector bottom) |
int |
ExactNumBottomBlobs()
\brief Returns the exact number of bottom blobs required by the layer,
or -1 if no exact number is required.
|
protected void |
Forward_cpu(DoubleBlobVector bottom,
DoubleBlobVector top) |
protected void |
Forward_gpu(DoubleBlobVector bottom,
DoubleBlobVector top) |
void |
LayerSetUp(DoubleBlobVector bottom,
DoubleBlobVector top)
\brief Does layer-specific setup: your layer should implement this function
as well as Reshape.
|
BytePointer |
type()
\brief Returns the layer type.
|
AutoTopBlobs, ExactNumTopBlobs, ReshapeBackward, blobs, CheckBlobCounts, EqualNumBottomTopBlobs, Forward, layer_param, loss, MaxBottomBlobs, MaxTopBlobs, MinBottomBlobs, MinTopBlobs, param_propagate_down, set_loss, set_param_propagate_down, SetUp, ToProtoaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic DoubleContrastiveLossLayer(Pointer p)
Pointer.Pointer(Pointer).public DoubleContrastiveLossLayer(@Const @ByRef LayerParameter param)
@Virtual public void LayerSetUp(@Const @ByRef DoubleBlobVector bottom, @Const @ByRef DoubleBlobVector top)
DoubleLayerLayerSetUp in class DoubleLossLayerbottom - the preshaped input blobs, whose data fields store the input data for
this layertop - the allocated but unshaped output blobs
This method should do one-time layer specific setup. This includes reading
and processing relevent parameters from the layer_param_.
Setting up the shapes of top blobs and internal buffers should be done in
Reshape, which will be called before the forward pass to
adjust the top blob sizes.@Virtual @Const(value={false,false,true}) public int ExactNumBottomBlobs()
DoubleLayerExactNumBottomBlobs in class DoubleLossLayer@Virtual @Const(value={false,false,true}) @Cast(value="const char*") public BytePointer type()
DoubleLayertype in class DoubleLayer@Virtual @Cast(value="bool") @Const(value={false,false,true}) public boolean AllowForceBackward(@Const int bottom_index)
AllowForceBackward in class DoubleLossLayer@Virtual protected void Forward_cpu(@Const @ByRef DoubleBlobVector bottom, @Const @ByRef DoubleBlobVector top)
Forward_cpu in class DoubleLayer@Virtual protected void Forward_gpu(@Const @ByRef DoubleBlobVector bottom, @Const @ByRef DoubleBlobVector top)
Forward_gpu in class DoubleLayer@Virtual protected void Backward_cpu(@Const @ByRef DoubleBlobVector top, @Const @ByRef BoolVector propagate_down, @Const @ByRef DoubleBlobVector bottom)
Backward_cpu in class DoubleLayer@Virtual protected void Backward_gpu(@Const @ByRef DoubleBlobVector top, @Const @ByRef BoolVector propagate_down, @Const @ByRef DoubleBlobVector bottom)
Backward_gpu in class DoubleLayerCopyright © 2019. All rights reserved.