@Name(value="caffe::Blob<double>") @NoOffset @Properties(inherit=caffe.class) public class DoubleBlob extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
DoubleBlob() |
DoubleBlob(int[] shape) |
DoubleBlob(IntBuffer shape) |
DoubleBlob(int num,
int channels,
int height,
int width)
\brief Deprecated; use
Blob(const vector . |
DoubleBlob(IntPointer shape) |
DoubleBlob(long size)
Native array allocator.
|
DoubleBlob(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
asum_data()
\brief Compute the sum of absolute values (L1 norm) of the data.
|
double |
asum_diff()
\brief Compute the sum of absolute values (L1 norm) of the diff.
|
int |
CanonicalAxisIndex(int axis_index)
\brief Returns the 'canonical' version of a (usually) user-specified axis,
allowing for negative indexing (e.g., -1 for the last axis).
|
int |
channels()
\brief Deprecated legacy shape accessor channels: use shape(1) instead.
|
void |
CopyFrom(DoubleBlob source) |
void |
CopyFrom(DoubleBlob source,
boolean copy_diff,
boolean reshape)
\brief Copy from a source Blob.
|
int |
count() |
int |
count(int start_axis)
\brief Compute the volume of a slice spanning from a particular first
axis to the final axis.
|
int |
count(int start_axis,
int end_axis)
\brief Compute the volume of a slice; i.e., the product of dimensions
among a range of axes.
|
DoublePointer |
cpu_data() |
DoublePointer |
cpu_diff() |
double |
data_at(int[] index) |
double |
data_at(IntBuffer index) |
double |
data_at(int n,
int c,
int h,
int w) |
double |
data_at(IntPointer index) |
SyncedMemory |
data() |
double |
diff_at(int[] index) |
double |
diff_at(IntBuffer index) |
double |
diff_at(int n,
int c,
int h,
int w) |
double |
diff_at(IntPointer index) |
SyncedMemory |
diff() |
void |
FromProto(BlobProto proto) |
void |
FromProto(BlobProto proto,
boolean reshape) |
DoubleBlob |
getPointer(long i) |
DoublePointer |
gpu_data() |
DoublePointer |
gpu_diff() |
IntPointer |
gpu_shape() |
int |
height()
\brief Deprecated legacy shape accessor height: use shape(2) instead.
|
int |
LegacyShape(int index) |
DoublePointer |
mutable_cpu_data() |
DoublePointer |
mutable_cpu_diff() |
DoublePointer |
mutable_gpu_data() |
DoublePointer |
mutable_gpu_diff() |
int |
num_axes() |
int |
num()
\brief Deprecated legacy shape accessor num: use shape(0) instead.
|
int |
offset(int n) |
int |
offset(int[] indices) |
int |
offset(IntBuffer indices) |
int |
offset(int n,
int c,
int h,
int w) |
int |
offset(IntPointer indices) |
DoubleBlob |
position(long position) |
void |
Reshape(BlobShape shape) |
void |
Reshape(int[] shape) |
void |
Reshape(IntBuffer shape) |
void |
Reshape(int num,
int channels,
int height,
int width)
\brief Deprecated; use
Reshape(const vector . |
void |
Reshape(IntPointer shape)
\brief Change the dimensions of the blob, allocating new memory if
necessary.
|
void |
ReshapeLike(DoubleBlob other) |
void |
scale_data(double scale_factor)
\brief Scale the blob data by a constant factor.
|
void |
scale_diff(double scale_factor)
\brief Scale the blob diff by a constant factor.
|
void |
set_cpu_data(double[] data) |
void |
set_cpu_data(DoubleBuffer data) |
void |
set_cpu_data(DoublePointer data) |
void |
set_gpu_data(double[] data) |
void |
set_gpu_data(DoubleBuffer data) |
void |
set_gpu_data(DoublePointer data) |
BytePointer |
shape_string() |
IntPointer |
shape() |
int |
shape(int index)
\brief Returns the dimension of the index-th axis (or the negative index-th
axis from the end, if index is negative).
|
boolean |
ShapeEquals(BlobProto other) |
void |
ShareData(DoubleBlob other)
\brief Set the data_ shared_ptr to point to the SyncedMemory holding the
data_ of Blob other -- useful in Layer%s which simply perform a copy
in their Forward pass.
|
void |
ShareDiff(DoubleBlob other)
\brief Set the diff_ shared_ptr to point to the SyncedMemory holding the
diff_ of Blob other -- useful in Layer%s which simply perform a copy
in their Forward pass.
|
double |
sumsq_data()
\brief Compute the sum of squares (L2 norm squared) of the data.
|
double |
sumsq_diff()
\brief Compute the sum of squares (L2 norm squared) of the diff.
|
void |
ToProto(BlobProto proto) |
void |
ToProto(BlobProto proto,
boolean write_diff) |
void |
Update() |
int |
width()
\brief Deprecated legacy shape accessor width: use shape(3) instead.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public DoubleBlob(Pointer p)
Pointer(Pointer)
.public DoubleBlob(long size)
Pointer.position(long)
.public DoubleBlob()
public DoubleBlob(int num, int channels, int height, int width)
Blob(const vector& shape)
.public DoubleBlob(@StdVector IntPointer shape)
public DoubleBlob(@StdVector IntBuffer shape)
public DoubleBlob(@StdVector int[] shape)
public DoubleBlob position(long position)
public DoubleBlob getPointer(long i)
getPointer
in class Pointer
public void Reshape(int num, int channels, int height, int width)
Reshape(const vector& shape)
.public void Reshape(@StdVector IntPointer shape)
public void Reshape(@StdVector IntBuffer shape)
public void Reshape(@StdVector int[] shape)
public void ReshapeLike(@Const @ByRef DoubleBlob other)
@StdString public BytePointer shape_string()
@StdVector public IntPointer shape()
public int shape(int index)
index
- the axis index, which may be negative as it will be
"canonicalized" using CanonicalAxisIndex.
Dies on out of range index.public int num_axes()
public int count()
public int count(int start_axis, int end_axis)
start_axis
- The first axis to include in the slice.end_axis
- The first axis to exclude from the slice.public int count(int start_axis)
start_axis
- The first axis to include in the slice.public int CanonicalAxisIndex(int axis_index)
axis_index
- the axis index.
If 0 <= index < num_axes(), return index.
If -num_axes <= index <= -1, return (num_axes() - (-index)),
e.g., the last axis index (num_axes() - 1) if index == -1,
the second to last if index == -2, etc.
Dies on out of range index.public int num()
public int channels()
public int height()
public int width()
public int LegacyShape(int index)
public int offset(int n, int c, int h, int w)
public int offset(int n)
public int offset(@StdVector IntPointer indices)
public int offset(@StdVector IntBuffer indices)
public int offset(@StdVector int[] indices)
public void CopyFrom(@Const @ByRef DoubleBlob source, @Cast(value="bool") boolean copy_diff, @Cast(value="bool") boolean reshape)
source
- the Blob to copy fromcopy_diff
- if false, copy the data; if true, copy the diffreshape
- if false, require this Blob to be pre-shaped to the shape
of other (and die otherwise); if true, Reshape this Blob to other's
shape if necessarypublic void CopyFrom(@Const @ByRef DoubleBlob source)
public double data_at(int n, int c, int h, int w)
public double diff_at(int n, int c, int h, int w)
public double data_at(@StdVector IntPointer index)
public double data_at(@StdVector IntBuffer index)
public double data_at(@StdVector int[] index)
public double diff_at(@StdVector IntPointer index)
public double diff_at(@StdVector IntBuffer index)
public double diff_at(@StdVector int[] index)
@SharedPtr public SyncedMemory data()
@SharedPtr public SyncedMemory diff()
@Const public DoublePointer cpu_data()
public void set_cpu_data(DoublePointer data)
public void set_cpu_data(DoubleBuffer data)
public void set_cpu_data(double[] data)
@Const public IntPointer gpu_shape()
@Const public DoublePointer gpu_data()
public void set_gpu_data(DoublePointer data)
public void set_gpu_data(DoubleBuffer data)
public void set_gpu_data(double[] data)
@Const public DoublePointer cpu_diff()
@Const public DoublePointer gpu_diff()
public DoublePointer mutable_cpu_data()
public DoublePointer mutable_gpu_data()
public DoublePointer mutable_cpu_diff()
public DoublePointer mutable_gpu_diff()
public void Update()
public void ToProto(BlobProto proto)
public double asum_data()
public double asum_diff()
public double sumsq_data()
public double sumsq_diff()
public void scale_data(double scale_factor)
public void scale_diff(double scale_factor)
public void ShareData(@Const @ByRef DoubleBlob other)
public void ShareDiff(@Const @ByRef DoubleBlob other)
Copyright © 2022. All rights reserved.