@Namespace(value="torch::nn") @NoOffset @Properties(inherit=torch.class) public class EmbeddingBagOptions extends Pointer
EmbeddingBag
module.
Example:
EmbeddingBag model(EmbeddingBagOptions(10,
2).max_norm(2).norm_type(2.5).scale_grad_by_freq(true).sparse(true).mode(torch::kSum));
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
EmbeddingBagOptions(long num_embeddings,
long embedding_dim) |
EmbeddingBagOptions(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
Tensor |
_weight() |
LongPointer |
embedding_dim() |
BoolPointer |
include_last_offset() |
DoubleOptional |
max_norm() |
EmbeddingBagMode |
mode() |
DoublePointer |
norm_type() |
LongPointer |
num_embeddings() |
LongOptional |
padding_idx() |
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, 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 EmbeddingBagOptions(Pointer p)
Pointer(Pointer)
.@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer num_embeddings()
@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer embedding_dim()
@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 _weight()
@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.