@Namespace(value="torch::nn") @NoOffset @Properties(inherit=torch.class) public class TripletMarginWithDistanceLossImpl extends TripletMarginWithDistanceLossImplCloneable
a
, :math:p
, and :math:n
(representing anchor,
positive, and negative examples, respectively); and a nonnegative,
real-valued function
("distance function") used to compute the relationships between the anchor
and positive example ("positive distance") and the anchor and negative
example ("negative distance").
See
https://pytorch.org/docs/master/nn.html#torch.nn.TripletMarginWithDistanceLoss
to learn about the exact behavior of this module.
See the documentation for torch::nn::TripletMarginWithDistanceLossOptions
class to learn what constructor arguments are supported for this module.
Example:
TripletMarginWithDistanceLoss
model(TripletMarginWithDistanceLossOptions().margin(3).swap(false));
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
TripletMarginWithDistanceLossImpl() |
TripletMarginWithDistanceLossImpl(Module pointer)
Downcast constructor.
|
TripletMarginWithDistanceLossImpl(Pointer p)
Pointer cast constructor.
|
TripletMarginWithDistanceLossImpl(TripletMarginWithDistanceLossOptions options_) |
Modifier and Type | Method and Description |
---|---|
Tensor |
forward(Tensor anchor,
Tensor positive,
Tensor negative) |
TripletMarginWithDistanceLossOptions |
options()
The options with which this
Module was constructed. |
TripletMarginWithDistanceLossImpl |
options(TripletMarginWithDistanceLossOptions setter) |
void |
pretty_print(Pointer stream)
Pretty prints the
TripletMarginWithDistanceLoss module into the given
stream . |
void |
reset()
reset() must perform initialization of all members with reference
semantics, most importantly parameters, buffers and submodules. |
asModule, asModule, clone, clone
apply, apply, apply, apply, apply, apply, apply, apply, buffers, buffers, children, eval, is_serializable, is_training, load, modules, modules, name, named_buffers, named_buffers, named_children, named_modules, named_modules, named_modules, named_parameters, named_parameters, parameters, parameters, register_buffer, register_buffer, register_module, register_module, register_parameter, register_parameter, register_parameter, register_parameter, save, shiftLeft, to, to, to, train, unregister_module, unregister_module, zero_grad
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 TripletMarginWithDistanceLossImpl(Pointer p)
Pointer(Pointer)
.public TripletMarginWithDistanceLossImpl(Module pointer)
public TripletMarginWithDistanceLossImpl(@ByVal(nullValue="torch::nn::TripletMarginWithDistanceLossOptions{}") TripletMarginWithDistanceLossOptions options_)
public TripletMarginWithDistanceLossImpl()
public void reset()
TripletMarginWithDistanceLossImplCloneable
reset()
must perform initialization of all members with reference
semantics, most importantly parameters, buffers and submodules.reset
in class TripletMarginWithDistanceLossImplCloneable
public void pretty_print(@Cast(value="std::ostream*") @ByRef Pointer stream)
TripletMarginWithDistanceLoss
module into the given
stream
.pretty_print
in class Module
@ByVal public Tensor forward(@Const @ByRef Tensor anchor, @Const @ByRef Tensor positive, @Const @ByRef Tensor negative)
@ByRef public TripletMarginWithDistanceLossOptions options()
Module
was constructed.public TripletMarginWithDistanceLossImpl options(TripletMarginWithDistanceLossOptions setter)
Copyright © 2024. All rights reserved.