@Namespace(value="torch::nn") @NoOffset @Properties(inherit=torch.class) public class TransformerEncoderOptions extends Pointer
TransformerEncoder
Example:
TransformerEncoderLayer encoderLayer(TransformerEncoderLayerOptions(512,
8).dropout(0.1)); auto options = TransformerEncoderOptions(encoderLayer,
6).norm(LayerNorm(LayerNormOptions({2})));
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
TransformerEncoderOptions(Pointer p)
Pointer cast constructor.
|
TransformerEncoderOptions(TransformerEncoderLayerOptions encoder_layer_options,
long num_layers) |
Modifier and Type | Method and Description |
---|---|
AnyModule |
norm() |
LongPointer |
num_layers() |
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 TransformerEncoderOptions(Pointer p)
Pointer(Pointer)
.public TransformerEncoderOptions(@Const @ByRef TransformerEncoderLayerOptions encoder_layer_options, @Cast(value="int64_t") long num_layers)
@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer num_layers()
@ByRef @NoException(value=true) public AnyModule norm()
Copyright © 2024. All rights reserved.