@Namespace(value="torch::nn") @NoOffset @Properties(inherit=torch.class) public class MultiheadAttentionOptions extends Pointer
MultiheadAttention
module.
Example:
MultiheadAttention model(MultiheadAttentionOptions(20, 10).bias(false));
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
MultiheadAttentionOptions(long embed_dim,
long num_heads) |
MultiheadAttentionOptions(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
BoolPointer |
add_bias_kv() |
BoolPointer |
add_zero_attn() |
BoolPointer |
bias() |
DoublePointer |
dropout() |
LongPointer |
embed_dim() |
LongPointer |
kdim() |
LongPointer |
num_heads() |
LongPointer |
vdim() |
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 MultiheadAttentionOptions(Pointer p)
Pointer(Pointer)
.@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer embed_dim()
@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer num_heads()
@ByRef @NoException(value=true) public DoublePointer dropout()
@Cast(value="bool*") @ByRef @NoException(value=true) public BoolPointer bias()
@Cast(value="bool*") @ByRef @NoException(value=true) public BoolPointer add_bias_kv()
@Cast(value="bool*") @ByRef @NoException(value=true) public BoolPointer add_zero_attn()
@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer kdim()
@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer vdim()
Copyright © 2024. All rights reserved.