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