@Namespace(value="torch::nn") @Properties(inherit=torch.class) public class CrossEntropyLossOptions extends Pointer
CrossEntropyLoss module.
Example:
CrossEntropyLoss
model(CrossEntropyLossOptions().ignore_index(-100).reduction(torch::kMean));
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
CrossEntropyLossOptions()
Default native constructor.
|
CrossEntropyLossOptions(long size)
Native array allocator.
|
CrossEntropyLossOptions(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CrossEntropyLossOptions |
getPointer(long i) |
LongPointer |
ignore_index() |
DoublePointer |
label_smoothing() |
CrossEntropyLossOptions |
position(long position) |
LossReduction |
reduction() |
Tensor |
weight() |
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, zeropublic CrossEntropyLossOptions()
public CrossEntropyLossOptions(long size)
Pointer.position(long).public CrossEntropyLossOptions(Pointer p)
Pointer(Pointer).public CrossEntropyLossOptions position(long position)
public CrossEntropyLossOptions getPointer(long i)
getPointer in class Pointer@ByRef @NoException(value=true) public Tensor weight()
@Cast(value="int64_t*") @ByRef @NoException(value=true) public LongPointer ignore_index()
@ByRef @NoException(value=true) public LossReduction reduction()
@ByRef @NoException(value=true) public DoublePointer label_smoothing()
Copyright © 2024. All rights reserved.