@Namespace(value="torch::nn") @NoOffset @Properties(inherit=torch.class) public class TransformerEncoderLayerOptions extends Pointer
TransformerEncoderLayer
Example:
auto options = TransformerEncoderLayer(512, 8).dropout(0.2);
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
TransformerEncoderLayerOptions(long d_model,
long nhead) |
TransformerEncoderLayerOptions(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
TransformerActivation |
activation() |
LongPointer |
d_model() |
LongPointer |
dim_feedforward() |
DoublePointer |
dropout() |
LongPointer |
nhead() |
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 TransformerEncoderLayerOptions(Pointer p)
Pointer(Pointer)
.@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer d_model()
@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer nhead()
@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer dim_feedforward()
@ByRef @NoException(value=true) public DoublePointer dropout()
@ByRef @NoException(value=true) public TransformerActivation activation()
Copyright © 2024. All rights reserved.