@Namespace(value="torch::nn::functional") @Properties(inherit=torch.class) public class EmbeddingBagFuncOptions extends Pointer
torch::nn::functional::embedding_bag
.
Example:
namespace F = torch::nn::functional;
F::embedding_bag(input, weight,
F::EmbeddingBagFuncOptions().mode(torch::kSum).offsets(offsets));
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
EmbeddingBagFuncOptions()
Default native constructor.
|
EmbeddingBagFuncOptions(long size)
Native array allocator.
|
EmbeddingBagFuncOptions(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
EmbeddingBagFuncOptions |
getPointer(long i) |
BoolPointer |
include_last_offset() |
DoubleOptional |
max_norm() |
EmbeddingBagMode |
mode() |
DoublePointer |
norm_type() |
Tensor |
offsets() |
LongOptional |
padding_idx() |
Tensor |
per_sample_weights() |
EmbeddingBagFuncOptions |
position(long position) |
BoolPointer |
scale_grad_by_freq() |
BoolPointer |
sparse() |
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 EmbeddingBagFuncOptions()
public EmbeddingBagFuncOptions(long size)
Pointer.position(long)
.public EmbeddingBagFuncOptions(Pointer p)
Pointer(Pointer)
.public EmbeddingBagFuncOptions position(long position)
public EmbeddingBagFuncOptions getPointer(long i)
getPointer
in class Pointer
@ByRef @NoException(value=true) public Tensor offsets()
@ByRef @NoException(value=true) public DoubleOptional max_norm()
@ByRef @NoException(value=true) public DoublePointer norm_type()
@Cast(value="bool*") @ByRef @NoException(value=true) public BoolPointer scale_grad_by_freq()
@ByRef @NoException(value=true) public EmbeddingBagMode mode()
@Cast(value="bool*") @ByRef @NoException(value=true) public BoolPointer sparse()
@ByRef @NoException(value=true) public Tensor per_sample_weights()
@Cast(value="bool*") @ByRef @NoException(value=true) public BoolPointer include_last_offset()
@ByRef @NoException(value=true) public LongOptional padding_idx()
Copyright © 2024. All rights reserved.