org.bytedeco.caffe.FloatArgMaxLayer Maven / Gradle / Ivy
// Targeted by JavaCPP version 1.5.1: DO NOT EDIT THIS FILE
package org.bytedeco.caffe;
import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;
import static org.bytedeco.openblas.global.openblas_nolapack.*;
import static org.bytedeco.openblas.global.openblas.*;
import org.bytedeco.opencv.opencv_core.*;
import static org.bytedeco.opencv.global.opencv_core.*;
import org.bytedeco.opencv.opencv_imgproc.*;
import static org.bytedeco.opencv.global.opencv_imgproc.*;
import static org.bytedeco.opencv.global.opencv_imgcodecs.*;
import org.bytedeco.opencv.opencv_videoio.*;
import static org.bytedeco.opencv.global.opencv_videoio.*;
import org.bytedeco.opencv.opencv_highgui.*;
import static org.bytedeco.opencv.global.opencv_highgui.*;
import org.bytedeco.hdf5.*;
import static org.bytedeco.hdf5.global.hdf5.*;
import static org.bytedeco.caffe.global.caffe.*;
/**
* \brief Compute the index of the {@code K } max values for each datum across
* all dimensions {@code (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.
*/
@Name("caffe::ArgMaxLayer") @NoOffset @Properties(inherit = org.bytedeco.caffe.presets.caffe.class)
public class FloatArgMaxLayer extends FloatLayer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public FloatArgMaxLayer(Pointer p) { super(p); }
/**
* @param param provides ArgMaxParameter argmax_param,
* with ArgMaxLayer options:
* - top_k (\b optional uint, default 1).
* the number {@code 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.
*/
public FloatArgMaxLayer(@Const @ByRef LayerParameter param) { super((Pointer)null); allocate(param); }
private native void allocate(@Const @ByRef LayerParameter param);
@Virtual public native void LayerSetUp(@Const @ByRef FloatBlobVector bottom,
@Const @ByRef FloatBlobVector top);
@Virtual public native void Reshape(@Const @ByRef FloatBlobVector bottom,
@Const @ByRef FloatBlobVector top);
@Virtual public native @Const({false, false, true}) @Cast("const char*") BytePointer type();
@Virtual public native @Const({false, false, true}) int ExactNumBottomBlobs();
@Virtual public native @Const({false, false, true}) int ExactNumTopBlobs();
@Virtual protected native void Forward_cpu(@Const @ByRef FloatBlobVector bottom,
@Const @ByRef FloatBlobVector top);
@Virtual protected native void Backward_cpu(@Const @ByRef FloatBlobVector top,
@Const @ByRef BoolVector propagate_down, @Const @ByRef FloatBlobVector bottom);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy