@Namespace(value="torch::nn") @NoOffset @Properties(inherit=torch.class) public class TransformerDecoderOptions extends Pointer
TransformerDecoder
module.
Example:
TransformerDecoderLayer decoder_layer(TransformerDecoderLayerOptions(512,
8).dropout(0.1)); auto options = TransformerDecoderOptions(decoder_layer,
6)norm(LayerNorm(LayerNormOptions({2}))); TransformerDecoder
transformer_decoder(options);
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
TransformerDecoderOptions(Pointer p)
Pointer cast constructor.
|
TransformerDecoderOptions(TransformerDecoderLayerOptions decoder_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 TransformerDecoderOptions(Pointer p)
Pointer(Pointer)
.public TransformerDecoderOptions(@Const @ByRef TransformerDecoderLayerOptions decoder_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.