@Namespace(value="torch::nn") @Properties(inherit=torch.class) public class ParameterListImpl extends ParameterListImplCloneable
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
ParameterListImpl() |
ParameterListImpl(Module pointer)
Downcast constructor.
|
ParameterListImpl(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(StringTensorDictItem pair)
push the a given parameter at the end of the list
And the key of the pair will be discarded, only the value
will be added into the
ParameterList |
void |
append(Tensor param)
push the a given parameter at the end of the list
|
Tensor |
at(long idx)
Returns the value associated with the given
key. |
StringTensorDictItemVector.Iterator |
begin()
Returns an iterator to the start of the ParameterList
the iterator returned will be type of
OrderedDict<std::string,
torch::Tensor>::Item |
StringTensorDictItemVector.Iterator |
end()
Returns an iterator to the end of the ParameterList
the iterator returned will be type of
OrderedDict<std::string,
torch::Tensor>::Item |
Tensor |
get(long idx)
Returns the value associated with the given
key. |
boolean |
is_empty()
True if the ParameterList is empty
|
void |
pretty_print(Pointer stream)
Pretty prints the
ParameterList module into the given stream. |
void |
reset()
reset() is empty for ParameterList, since it does not have parameters
of its own. |
long |
size()
Return the size of the ParameterList
|
asModule, asModule, clone, cloneapply, 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_gradaddress, 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, zeropublic ParameterListImpl(Pointer p)
Pointer(Pointer).public ParameterListImpl(Module pointer)
public ParameterListImpl()
public void reset()
reset() is empty for ParameterList, since it does not have parameters
of its own.reset in class ParameterListImplCloneablepublic void pretty_print(@Cast(value="std::ostream*") @ByRef Pointer stream)
ParameterList module into the given stream.pretty_print in class Modulepublic void append(@ByRef(value=true) Tensor param)
public void append(@Const @ByRef StringTensorDictItem pair)
ParameterList@ByVal @Cast(value="torch::nn::ParameterListImpl::Iterator*") public StringTensorDictItemVector.Iterator begin()
OrderedDict<std::string,
torch::Tensor>::Item@ByVal @Cast(value="torch::nn::ParameterListImpl::Iterator*") public StringTensorDictItemVector.Iterator end()
OrderedDict<std::string,
torch::Tensor>::Item@ByRef public Tensor at(@Cast(value="size_t") long idx)
key. Throws an exception if
no such key is stored in the ParameterList. Check contains(key) before
for a non-throwing way of access@ByRef @Name(value="operator []") public Tensor get(@Cast(value="size_t") long idx)
key. Throws an exception if
no such key is stored in the ParameterList. Check contains(key) before
for a non-throwing way of access@Cast(value="size_t") @NoException(value=true) public long size()
@Cast(value="bool") @NoException(value=true) public boolean is_empty()
Copyright © 2024. All rights reserved.