@Namespace(value="torch::nn") @NoOffset @Properties(inherit=torch.class) public class BilinearImpl extends BilinearImplCloneable
torch::nn::BilinearOptions
class to learn what
constructor arguments are supported for this module.
Example:
Bilinear model(BilinearOptions(3, 2, 4).bias(false));
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
BilinearImpl(BilinearOptions options_) |
BilinearImpl(long in1_features,
long in2_features,
long out_features) |
BilinearImpl(Module pointer)
Downcast constructor.
|
BilinearImpl(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
Tensor |
bias()
The learned bias.
|
BilinearImpl |
bias(Tensor setter) |
Tensor |
forward(Tensor input1,
Tensor input2)
Applies a bilinear transform on the
input1 and input2 tensor by
multiplying with the weight and optionally adding the bias , if
with_bias is true in the options. |
BilinearOptions |
options()
The options used to configure this module.
|
BilinearImpl |
options(BilinearOptions setter) |
void |
pretty_print(Pointer stream)
Pretty prints the
Bilinear module into the given stream . |
void |
reset_parameters() |
void |
reset()
reset() must perform initialization of all members with reference
semantics, most importantly parameters, buffers and submodules. |
Tensor |
weight()
The learned weight.
|
BilinearImpl |
weight(Tensor setter) |
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 BilinearImpl(Pointer p)
Pointer(Pointer)
.public BilinearImpl(Module pointer)
public BilinearImpl(@Cast(value="int64_t") long in1_features, @Cast(value="int64_t") long in2_features, @Cast(value="int64_t") long out_features)
public BilinearImpl(@Const @ByRef BilinearOptions options_)
public void reset()
BilinearImplCloneable
reset()
must perform initialization of all members with reference
semantics, most importantly parameters, buffers and submodules.reset
in class BilinearImplCloneable
public void reset_parameters()
public void pretty_print(@Cast(value="std::ostream*") @ByRef Pointer stream)
Bilinear
module into the given stream
.pretty_print
in class Module
@ByVal public Tensor forward(@Const @ByRef Tensor input1, @Const @ByRef Tensor input2)
input1
and input2
tensor by
multiplying with the weight
and optionally adding the bias
, if
with_bias
is true in the options.@ByRef public BilinearOptions options()
public BilinearImpl options(BilinearOptions setter)
public BilinearImpl weight(Tensor setter)
@ByRef public Tensor bias()
with_bias
is false in the options
, this tensor is
undefined.public BilinearImpl bias(Tensor setter)
Copyright © 2024. All rights reserved.