@Name(value="caffe::ArgMaxLayer<float>") @NoOffset @Properties(inherit=caffe.class) public class FloatArgMaxLayer extends FloatLayer
K
max values for each datum across
all dimensions (C \times H \times W)
.
Intended for use after a classification layer to produce a prediction.
If parameter out_max_val is set to true, output is a vector of pairs
(max_ind, max_val) for each image. The axis parameter specifies an axis
along which to maximise.
NOTE: does not implement Backwards operation.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
FloatArgMaxLayer(LayerParameter param) |
FloatArgMaxLayer(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
Backward_cpu(FloatBlobVector top,
BoolVector propagate_down,
FloatBlobVector bottom) |
int |
ExactNumBottomBlobs()
\brief Returns the exact number of bottom blobs required by the layer,
or -1 if no exact number is required.
|
int |
ExactNumTopBlobs()
\brief Returns the exact number of top blobs required by the layer,
or -1 if no exact number is required.
|
protected void |
Forward_cpu(FloatBlobVector bottom,
FloatBlobVector top) |
void |
LayerSetUp(FloatBlobVector bottom,
FloatBlobVector top)
\brief Does layer-specific setup: your layer should implement this function
as well as Reshape.
|
void |
Reshape(FloatBlobVector bottom,
FloatBlobVector top)
\brief Adjust the shapes of top blobs and internal buffers to accommodate
the shapes of the bottom blobs.
|
BytePointer |
type()
\brief Returns the layer type.
|
AllowForceBackward, AutoTopBlobs, Backward_gpu, Backward, blobs, CheckBlobCounts, EqualNumBottomTopBlobs, Forward_gpu, Forward, layer_param, loss, MaxBottomBlobs, MaxTopBlobs, MinBottomBlobs, MinTopBlobs, param_propagate_down, set_loss, set_param_propagate_down, SetUp, ToProto
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public FloatArgMaxLayer(Pointer p)
Pointer(Pointer)
.public FloatArgMaxLayer(@Const @ByRef LayerParameter param)
param
- provides ArgMaxParameter argmax_param,
with ArgMaxLayer options:
- top_k (\b optional uint, default 1).
the number K
of maximal items to output.
- out_max_val (\b optional bool, default false).
if set, output a vector of pairs (max_ind, max_val) unless axis is set then
output max_val along the specified axis.
- axis (\b optional int).
if set, maximise along the specified axis else maximise the flattened
trailing dimensions for each index of the first / num dimension.@Virtual public void LayerSetUp(@Const @ByRef FloatBlobVector bottom, @Const @ByRef FloatBlobVector top)
FloatLayer
LayerSetUp
in class FloatLayer
bottom
- 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 public void Reshape(@Const @ByRef FloatBlobVector bottom, @Const @ByRef FloatBlobVector top)
FloatLayer
Reshape
in class FloatLayer
bottom
- the input blobs, with the requested input shapestop
- the top blobs, which should be reshaped as needed
This method should reshape top blobs as needed according to the shapes
of the bottom (input) blobs, as well as reshaping any internal buffers
and making any other necessary adjustments so that the layer can
accommodate the bottom blobs.@Virtual @Const(value={false,false,true}) @Cast(value="const char*") public BytePointer type()
FloatLayer
type
in class FloatLayer
@Virtual @Const(value={false,false,true}) public int ExactNumBottomBlobs()
FloatLayer
ExactNumBottomBlobs
in class FloatLayer
@Virtual @Const(value={false,false,true}) public int ExactNumTopBlobs()
FloatLayer
ExactNumTopBlobs
in class FloatLayer
@Virtual protected void Forward_cpu(@Const @ByRef FloatBlobVector bottom, @Const @ByRef FloatBlobVector top)
Forward_cpu
in class FloatLayer
@Virtual protected void Backward_cpu(@Const @ByRef FloatBlobVector top, @Const @ByRef BoolVector propagate_down, @Const @ByRef FloatBlobVector bottom)
Backward_cpu
in class FloatLayer
Copyright © 2022. All rights reserved.