All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bytedeco.pytorch.Module Maven / Gradle / Ivy

// Targeted by JavaCPP version 1.5.9: DO NOT EDIT THIS FILE

package org.bytedeco.pytorch;

import org.bytedeco.pytorch.Allocator;
import org.bytedeco.pytorch.Function;
import org.bytedeco.pytorch.Module;
import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.bytedeco.javacpp.presets.javacpp.*;
import static org.bytedeco.openblas.global.openblas_nolapack.*;
import static org.bytedeco.openblas.global.openblas.*;

import static org.bytedeco.pytorch.global.torch.*;


/** The base class for all modules in PyTorch.
 * 
 *  \rst
 *  .. note::
 *    The design and implementation of this class is largely based on the Python
 *    API. You may want to consult the python documentation for
 *    :py:class:{@code pytorch:torch.nn.Module} for further clarification on certain
 *    methods or behavior.
 *  \endrst
 * 
 *  A {@code Module} is an abstraction over the implementation of some function or
 *  algorithm, possibly associated with some persistent data. A {@code Module} may
 *  contain further {@code Module}s ("submodules"), each with their own
 *  implementation, persistent data and further submodules. {@code Module}s can thus
 *  be said to form a recursive tree structure. A {@code Module} is registered as a
 *  submodule to another {@code Module} by calling {@code register_module()}, typically from
 *  within a parent module's constructor.
 * 
 *  A distinction is made between three kinds of persistent data that may be
 *  associated with a {@code Module}:
 * 
 *  1. *Parameters*: tensors that record gradients, typically weights updated
 *     during the backward step (e.g. the {@code weight} of a {@code Linear} module),
 *  2. *Buffers*: tensors that do not record gradients, typically updated during
 *     the forward step, such as running statistics (e.g. {@code mean} and {@code variance}
 *     in the {@code BatchNorm} module),
 *  3. Any additional state, not necessarily tensors, required for the
 *     implementation or configuration of a {@code Module}.
 * 
 *  The first two kinds of state are special in that they may be registered
 *  with the {@code Module} system to allow convenient access and batch configuration.
 *  For example, registered parameters in any {@code Module} may be iterated over via
 *  the {@code parameters()} accessor. Further, changing the data type of a {@code Module}'s
 *  registered parameters can be done conveniently via {@code Module::to()}, e.g.
 *  {@code module->to(torch::kCUDA)} to move all parameters to GPU memory. Lastly,
 *  registered parameters and buffers are handled specially during a {@code clone()}
 *  operation, which performs a deepcopy of a cloneable {@code Module} hierarchy.
 * 
 *  Parameters are registered with a {@code Module} via {@code register_parameter}. Buffers
 *  are registered separately via {@code register_buffer}. These methods are part of
 *  the public API of {@code Module} and are typically invoked from within a
 *  concrete {@code Module}s constructor. */
@Namespace("torch::nn") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class)
public class Module extends Pointer {
    static { Loader.load(); }
    /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
    public Module(Pointer p) { super(p); }
    /** Native array allocator. Access with {@link Pointer#position(long)}. */
    public Module(long size) { super((Pointer)null); allocateArray(size); }
    private native void allocateArray(long size);
    @Override public Module position(long position) {
        return (Module)super.position(position);
    }
    @Override public Module getPointer(long i) {
        return new Module((Pointer)this).offsetAddress(i);
    }


  /** Tells the base {@code Module} about the name of the submodule. */
  public Module(@StdString BytePointer name) { super((Pointer)null); allocate(name); }
  private native void allocate(@StdString BytePointer name);
  public Module(@StdString String name) { super((Pointer)null); allocate(name); }
  private native void allocate(@StdString String name);

  /** Constructs the module without immediate knowledge of the submodule's name.
   *  The name of the submodule is inferred via RTTI (if possible) the first
   *  time {@code .name()} is invoked. */
  public Module() { super((Pointer)null); allocate(); }
  private native void allocate();

  /** Returns the name of the {@code Module}.
   * 
   *  A {@code Module} has an associated {@code name}, which is a string representation of
   *  the kind of concrete {@code Module} it represents, such as {@code "Linear"} for the
   *  {@code Linear} module. Under most circumstances, this name is automatically
   *  inferred via runtime type information (RTTI). In the unusual circumstance
   *  that you have this feature disabled, you may want to manually name your
   *  {@code Module}s by passing the string name to the {@code Module} base class'
   *  constructor. */
  
  ///
  ///
  public native @StdString @NoException(true) BytePointer name();

  /** Performs a recursive deep copy of the module and all its registered
   *  parameters, buffers and submodules.
   * 
   *  Optionally, this method sets the current device
   *  to the one supplied before cloning. If no device is given, each
   *  parameter and buffer will be moved to the device of its source.
   * 
   *  \rst
   *  .. attention::
   *    Attempting to call the {@code clone()} method inherited from the base {@code Module}
   *    class (the one documented here) will fail. To inherit an actual
   *    implementation of {@code clone()}, you must subclass {@code Cloneable}. {@code Cloneable}
   *    is templatized on the concrete module type, and can thus properly copy a
   *    {@code Module}. This method is provided on the base class' API solely for an
   *    easier-to-use polymorphic interface.
   *  \endrst */
  
  ///
  public native @SharedPtr @Cast({"", "std::shared_ptr"}) Module clone(
        @Const @ByRef(nullValue = "c10::optional(c10::nullopt)") DeviceOptional device);
  public native @SharedPtr @Cast({"", "std::shared_ptr"}) Module clone();

  /** Applies the {@code function} to the {@code Module} and recursively to every submodule.
   *  The function must accept a {@code Module&}.
   * 
   *  \rst
   *  .. code-block:: cpp
   *    MyModule module;
   *    module->apply([](nn::Module& module) {
   *      std::cout << module.name() << std::endl;
   *    });
   *  \endrst */
  
  ///
  public native void apply(@Cast("const torch::nn::Module::ModuleApplyFunction*") @ByRef ModuleFunction function);

  /** Applies the {@code function} to the {@code Module} and recursively to every submodule.
   *  The function must accept a {@code const Module&}.
   * 
   *  \rst
   *  .. code-block:: cpp
   *    MyModule module;
   *    module->apply([](const nn::Module& module) {
   *      std::cout << module.name() << std::endl;
   *    });
   *  \endrst */

  /** Applies the {@code function} to the {@code Module} and recursively to every submodule.
   *  The function must accept a {@code const std::string&} for the key of the module,
   *  and a {@code Module&}. The key of the module itself is the empty string. If
   *  {@code name_prefix} is given, it is prepended to every key as
   *  {@code .} (and just {@code name_prefix} for the module itself).
   * 
   *  \rst
   *  .. code-block:: cpp
   *    MyModule module;
   *    module->apply([](const std::string& key, nn::Module& module) {
   *      std::cout << key << ": " << module.name() << std::endl;
   *    });
   *  \endrst */
  
  ///
  public native void apply(
        @Cast("const torch::nn::Module::NamedModuleApplyFunction*") @ByRef Pointer function,
        @StdString BytePointer name_prefix/*=std::string()*/);
  public native void apply(
        @Cast("const torch::nn::Module::NamedModuleApplyFunction*") @ByRef Pointer function);
  public native void apply(
        @Cast("const torch::nn::Module::NamedModuleApplyFunction*") @ByRef Pointer function,
        @StdString String name_prefix/*=std::string()*/);

  /** Applies the {@code function} to the {@code Module} and recursively to every submodule.
   *  The function must accept a {@code const std::string&} for the key of the module,
   *  and a {@code const Module&}. The key of the module itself is the empty string.
   *  If {@code name_prefix} is given, it is prepended to every key as
   *  {@code .} (and just {@code name_prefix} for the module itself).
   * 
   *  \rst
   *  .. code-block:: cpp
   *    MyModule module;
   *    module->apply([](const std::string& key, const nn::Module& module) {
   *      std::cout << key << ": " << module.name() << std::endl;
   *    });
   *  \endrst */

  /** Applies the {@code function} to the {@code Module} and recursively to every submodule.
   *  The function must accept a {@code const std::shared_ptr&}.
   * 
   *  \rst
   *  .. code-block:: cpp
   *    MyModule module;
   *    module->apply([](const std::shared_ptr& module) {
   *      std::cout << module->name() << std::endl;
   *    });
   *  \endrst */

  /** Applies the {@code function} to the {@code Module} and recursively to every submodule.
   *  The function must accept a {@code const std::string&} for the key of the module,
   *  and a {@code const std::shared_ptr&}. The key of the module itself is
   *  the empty string. If {@code name_prefix} is given, it is prepended to every key
   *  as
   *  {@code .} (and just {@code name_prefix} for the module itself).
   * 
   *  \rst
   *  .. code-block:: cpp
   *    MyModule module;
   *    module->apply([](const std::string& key,
   *                     const std::shared_ptr& module) {
   *      std::cout << key << ": " << module->name() << std::endl;
   *    });
   *  \endrst */

  /** Returns the parameters of this {@code Module} and if {@code recurse} is true, also
   *  recursively of every submodule. */
  public native @Cast({"", "std::vector"}) @StdMove TensorVector parameters(@Cast("bool") boolean recurse/*=true*/);
  public native @Cast({"", "std::vector"}) @StdMove TensorVector parameters();

  /** Returns an {@code OrderedDict} with the parameters of this {@code Module} along with
   *  their keys, and if {@code recurse} is true also recursively of every submodule. */
  public native @ByVal StringTensorDict named_parameters(@Cast("bool") boolean recurse/*=true*/);
  public native @ByVal StringTensorDict named_parameters();

  /** Returns the buffers of this {@code Module} and if {@code recurse} is true, also
   *  recursively of every submodule. */
  public native @Cast({"", "std::vector"}) @StdMove TensorVector buffers(@Cast("bool") boolean recurse/*=true*/);
  public native @Cast({"", "std::vector"}) @StdMove TensorVector buffers();

  /** Returns an {@code OrderedDict} with the buffers of this {@code Module} along with
   *  their keys, and if {@code recurse} is true also recursively of every submodule. */
  
  ///
  public native @ByVal StringTensorDict named_buffers(@Cast("bool") boolean recurse/*=true*/);
  public native @ByVal StringTensorDict named_buffers();

  /** Returns the submodules of this {@code Module} (the entire submodule hierarchy)
   *  and if {@code include_self} is true, also inserts a {@code shared_ptr} to this module
   *  in the first position.
   * 
   *  \rst
   *  .. warning::
   *    Only pass {@code include_self} as {@code true} if this {@code Module} is stored in a
   *    {@code shared_ptr}! Otherwise an exception will be thrown. You may still call
   *    this method with {@code include_self} set to false if your {@code Module} is not
   *    stored in a {@code shared_ptr}.
   *  \endrst */
  
  ///
  public native @ByVal SharedModuleVector modules(@Cast("bool") boolean include_self/*=true*/);
  public native @ByVal SharedModuleVector modules();

  /** Returns an {@code OrderedDict} of the submodules of this {@code Module} (the entire
   *  submodule hierarchy) and their keys, and if {@code include_self} is true, also
   *  inserts a {@code shared_ptr} to this module in the first position. If
   *  {@code name_prefix} is given, it is prepended to every key as
   *  {@code .} (and just {@code name_prefix} for the module itself).
   * 
   *  \rst
   *  .. warning::
   *    Only pass {@code include_self} as {@code true} if this {@code Module} is stored in a
   *    {@code shared_ptr}! Otherwise an exception will be thrown. You may still call
   *    this method with {@code include_self} set to false if your {@code Module} is not
   *    stored in a {@code shared_ptr}.
   *  \endrst */
  public native @ByVal StringSharedModuleDict named_modules(
        @StdString BytePointer name_prefix/*=std::string()*/,
        @Cast("bool") boolean include_self/*=true*/);
  public native @ByVal StringSharedModuleDict named_modules();
  public native @ByVal StringSharedModuleDict named_modules(
        @StdString String name_prefix/*=std::string()*/,
        @Cast("bool") boolean include_self/*=true*/);

  /** Returns the direct submodules of this {@code Module}. */
  public native @ByVal SharedModuleVector children();

  /** Returns an {@code OrderedDict} of the direct submodules of this {@code Module} and
   *  their keys. */
  public native @ByVal StringSharedModuleDict named_children();

  /** Enables "training" mode. */
  public native void train(@Cast("bool") boolean on/*=true*/);
  public native void train();

  /** Calls train(false) to enable "eval" mode.
   *  Do not override this method, override {@code train()} instead. */
  
  ///
  public native void eval();

  /** True if the module is in training mode.
   * 
   *  Every {@code Module} has a boolean associated with it that determines whether
   *  the {@code Module} is currently in *training* mode (set via {@code .train()}) or in
   *  *evaluation* (inference) mode (set via {@code .eval()}). This property is
   *  exposed via {@code is_training()}, and may be used by the implementation of a
   *  concrete module to modify its runtime behavior. See the {@code BatchNorm} or
   *  {@code Dropout} modules for examples of {@code Module}s that use different code paths
   *  depending on this property. */
  
  ///
  public native @Cast("bool") @NoException(true) boolean is_training();

  /** Recursively casts all parameters to the given {@code dtype} and {@code device}.
   * 
   *  If {@code non_blocking} is true and the source is in pinned memory and
   *  destination is on the GPU or vice versa, the copy is performed
   *  asynchronously with respect to the host. Otherwise, the argument has no
   *  effect. */
  
  ///
  public native void to(
        @ByVal Device device,
        ScalarType dtype,
        @Cast("bool") boolean non_blocking/*=false*/);
  public native void to(
        @ByVal Device device,
        ScalarType dtype);

  /** Recursively casts all parameters to the given dtype.
   * 
   *  If {@code non_blocking} is true and the source is in pinned memory and
   *  destination is on the GPU or vice versa, the copy is performed
   *  asynchronously with respect to the host. Otherwise, the argument has no
   *  effect. */
  
  ///
  public native void to(ScalarType dtype, @Cast("bool") boolean non_blocking/*=false*/);
  public native void to(ScalarType dtype);

  /** Recursively moves all parameters to the given device.
   * 
   *  If {@code non_blocking} is true and the source is in pinned memory and
   *  destination is on the GPU or vice versa, the copy is performed
   *  asynchronously with respect to the host. Otherwise, the argument has no
   *  effect. */
  public native void to(@ByVal Device device, @Cast("bool") boolean non_blocking/*=false*/);
  public native void to(@ByVal Device device);

  /** Recursively zeros out the {@code grad} value of each registered parameter. */
  
  ///
  ///
  ///
  public native void zero_grad(@Cast("bool") boolean set_to_none/*=true*/);
  public native void zero_grad();

  /** Attempts to cast this {@code Module} to the given {@code ModuleType}.
   * 
   *  This method is useful when calling {@code apply()}.
   *  \rst
   *  .. code-block:: cpp
   * 
   *    void initialize_weights(nn::Module& module) {
   *      torch::NoGradGuard no_grad;
   *      if (auto* linear = module.as()) {
   *        linear->weight.normal_(0.0, 0.02);
   *      }
   *    }
   * 
   *    MyModule module;
   *    module->apply(initialize_weights);
   *  \endrst */
  
  ///
  ///
  public Module asModule() { return this; }

  /** Attempts to cast this {@code Module} to the given {@code ModuleType}.
   * 
   *  This method is useful when calling {@code apply()}.
   *  \rst
   *  .. code-block:: cpp
   *    void initialize_weights(nn::Module& module) {
   *      torch::NoGradGuard no_grad;
   *      if (auto* linear = module.as()) {
   *        linear->weight.normal_(0.0, 0.02);
   *      }
   *    }
   * 
   *    MyModule module;
   *    module->apply(initialize_weights);
   *  \endrst */

  /** Attempts to cast this {@code Module} to the given {@code ModuleType}.
   * 
   *  This method is useful when calling {@code apply()}.
   *  \rst
   *  .. code-block:: cpp
   * 
   *    void initialize_weights(nn::Module& module) {
   *      torch::NoGradGuard no_grad;
   *      if (auto* linear = module.as()) {
   *        linear->weight.normal_(0.0, 0.02);
   *      }
   *    }
   * 
   *    MyModule module;
   *    module.apply(initialize_weights);
   *  \endrst */

  /** Attempts to cast this {@code Module} to the given {@code ModuleType}.
   * 
   *  This method is useful when calling {@code apply()}.
   *  \rst
   *  .. code-block:: cpp
   * 
   *    void initialize_weights(nn::Module& module) {
   *      torch::NoGradGuard no_grad;
   *      if (auto* linear = module.as()) {
   *        linear->weight.normal_(0.0, 0.02);
   *      }
   *    }
   * 
   *    MyModule module;
   *    module.apply(initialize_weights);
   *  \endrst */

  /** Serializes the {@code Module} into the given {@code OutputArchive}.
   * 
   *  If the {@code Module} contains unserializable submodules (e.g.
   *  {@code nn::Functional}), those submodules are skipped when serializing. */
  
  ///
  public native void save(@ByRef OutputArchive archive);

  /** Deserializes the {@code Module} from the given {@code InputArchive}.
   * 
   *  If the {@code Module} contains unserializable submodules (e.g.
   *  {@code nn::Functional}), we don't check the existence of those submodules in the
   *  {@code InputArchive} when deserializing. */
  
  ///
  public native void load(@ByRef InputArchive archive);

  /** Streams a pretty representation of the {@code Module} into the given {@code stream}.
   *  By default, this representation will be the name of the module (taken from
   *  {@code name()}), followed by a recursive pretty print of all of the {@code Module}'s
   *  submodules.
   * 
   *  Override this method to change the pretty print. The input
   *  {@code stream} should be returned from the method, to allow easy chaining. */
  public native void pretty_print(@Cast("std::ostream*") @ByRef Pointer stream);

  /** Returns whether the {@code Module} is serializable. */
  
  ///
  ///
  ///
  ///
  public native @Cast("bool") boolean is_serializable();

  /** Registers a parameter with this {@code Module}.
   * 
   *  A parameter should be any gradient-recording tensor used in the
   *  implementation of your {@code Module}. Registering it makes it available to
   *  methods such as {@code parameters()}, {@code clone()} or {@code to().}
   * 
   *  Note that registering an undefined Tensor (e.g.
   *  {@code module.register_parameter("param", Tensor())}) is allowed, and is
   *  equivalent to {@code module.register_parameter("param", None)} in Python API.
   * 
   *  \rst
   *  .. code-block:: cpp
   * 
   *    MyModule::MyModule() {
   *      weight_ = register_parameter("weight", torch::randn({A, B}));
   *    }
   *  \endrst */
  
  ///
  ///
  ///
  public native @ByRef Tensor register_parameter(
        @StdString BytePointer name,
        @ByVal Tensor tensor,
        @Cast("bool") boolean requires_grad/*=true*/);
  public native @ByRef Tensor register_parameter(
        @StdString BytePointer name,
        @ByVal Tensor tensor);
  public native @ByRef Tensor register_parameter(
        @StdString String name,
        @ByVal Tensor tensor,
        @Cast("bool") boolean requires_grad/*=true*/);
  public native @ByRef Tensor register_parameter(
        @StdString String name,
        @ByVal Tensor tensor);

  /** Registers a buffer with this {@code Module}.
   * 
   *  A buffer is intended to be state in your module that does not record
   *  gradients, such as running statistics. Registering it makes it available
   *  to methods such as {@code buffers()}, {@code clone()} or {@code to().
   * 
   *  \rst
   *  .. code-block:: cpp
   * 
   *    MyModule::MyModule() {
   *      mean_ = register_buffer("mean", torch::empty({num_features_}));
   *    }
   *  \endrst */
  
  ///
  ///
  ///
  public native @ByRef Tensor register_buffer(@StdString BytePointer name, @ByVal Tensor tensor);
  public native @ByRef Tensor register_buffer(@StdString String name, @ByVal Tensor tensor);

  /** Registers a submodule with this {@code Module}.
   * 
   *  Registering a module makes it available to methods such as {@code modules()},
   *  {@code clone()} or {@code to()}.
   * 
   *  \rst
   *  .. code-block:: cpp
   * 
   *    MyModule::MyModule() {
   *      submodule_ = register_module("linear", torch::nn::Linear(3, 4));
   *    }
   *  \endrst */
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Module register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Module module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Module register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Module module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ModuleDictImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ModuleDictImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ModuleDictImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ModuleDictImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ModuleListImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ModuleListImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ModuleListImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ModuleListImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SequentialImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SequentialImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SequentialImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SequentialImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ParameterDictImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ParameterDictImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ParameterDictImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ParameterDictImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ParameterListImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ParameterListImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ParameterListImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ParameterListImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveLogSoftmaxWithLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveLogSoftmaxWithLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveLogSoftmaxWithLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveLogSoftmaxWithLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BatchNorm1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BatchNorm1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) InstanceNorm1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) InstanceNorm1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Conv1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Conv1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConvTranspose1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConvTranspose1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) DropoutImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) DropoutImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) DropoutImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) DropoutImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BatchNorm2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BatchNorm2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) InstanceNorm2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) InstanceNorm2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Conv2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Conv2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConvTranspose2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConvTranspose2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Dropout2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Dropout2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Dropout2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Dropout2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BatchNorm3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BatchNorm3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) InstanceNorm3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) InstanceNorm3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Conv3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Conv3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConvTranspose3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConvTranspose3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Dropout3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Dropout3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Dropout3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Dropout3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AlphaDropoutImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AlphaDropoutImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AlphaDropoutImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AlphaDropoutImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FeatureAlphaDropoutImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FeatureAlphaDropoutImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FeatureAlphaDropoutImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FeatureAlphaDropoutImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CosineSimilarityImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CosineSimilarityImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CosineSimilarityImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CosineSimilarityImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PairwiseDistanceImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PairwiseDistanceImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PairwiseDistanceImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PairwiseDistanceImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) EmbeddingImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) EmbeddingImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) EmbeddingImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) EmbeddingImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) EmbeddingBagImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) EmbeddingBagImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) EmbeddingBagImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) EmbeddingBagImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FoldImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FoldImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FoldImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FoldImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UnfoldImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) UnfoldImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UnfoldImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) UnfoldImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) IdentityImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) IdentityImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) IdentityImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) IdentityImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LinearImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LinearImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LinearImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LinearImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BilinearImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BilinearImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BilinearImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BilinearImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FlattenImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FlattenImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FlattenImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FlattenImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UnflattenImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) UnflattenImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UnflattenImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) UnflattenImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) L1LossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) L1LossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) L1LossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) L1LossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) KLDivLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) KLDivLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) KLDivLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) KLDivLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MSELossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MSELossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MSELossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MSELossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BCELossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BCELossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BCELossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BCELossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HingeEmbeddingLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) HingeEmbeddingLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HingeEmbeddingLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) HingeEmbeddingLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiMarginLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MultiMarginLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiMarginLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MultiMarginLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CosineEmbeddingLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CosineEmbeddingLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CosineEmbeddingLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CosineEmbeddingLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SmoothL1LossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SmoothL1LossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SmoothL1LossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SmoothL1LossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HuberLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) HuberLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HuberLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) HuberLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiLabelMarginLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MultiLabelMarginLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiLabelMarginLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MultiLabelMarginLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftMarginLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftMarginLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftMarginLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftMarginLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiLabelSoftMarginLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MultiLabelSoftMarginLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiLabelSoftMarginLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MultiLabelSoftMarginLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TripletMarginLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TripletMarginLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TripletMarginLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TripletMarginLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TripletMarginWithDistanceLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TripletMarginWithDistanceLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TripletMarginWithDistanceLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TripletMarginWithDistanceLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CTCLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CTCLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CTCLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CTCLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PoissonNLLLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PoissonNLLLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PoissonNLLLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PoissonNLLLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MarginRankingLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MarginRankingLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MarginRankingLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MarginRankingLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) NLLLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) NLLLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) NLLLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) NLLLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CrossEntropyLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CrossEntropyLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CrossEntropyLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CrossEntropyLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BCEWithLogitsLossImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BCEWithLogitsLossImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BCEWithLogitsLossImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) BCEWithLogitsLossImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReflectionPad1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReflectionPad1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReplicationPad1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReplicationPad1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConstantPad1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConstantPad1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AvgPool1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AvgPool1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxPool1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxPool1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxUnpool1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxUnpool1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LPPool1dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LPPool1dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LPPool1dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LPPool1dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReflectionPad2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReflectionPad2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReplicationPad2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReplicationPad2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConstantPad2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConstantPad2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ZeroPad2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ZeroPad2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ZeroPad2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ZeroPad2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AvgPool2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AvgPool2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxPool2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxPool2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxUnpool2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxUnpool2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FractionalMaxPool2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FractionalMaxPool2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FractionalMaxPool2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FractionalMaxPool2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LPPool2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LPPool2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LPPool2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LPPool2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReflectionPad3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReflectionPad3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReplicationPad3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReplicationPad3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConstantPad3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ConstantPad3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AvgPool3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AvgPool3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxPool3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxPool3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxUnpool3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MaxUnpool3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FractionalMaxPool3dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FractionalMaxPool3dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FractionalMaxPool3dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) FractionalMaxPool3dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RNNImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) RNNImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RNNImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) RNNImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LSTMImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LSTMImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LSTMImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LSTMImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GRUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GRUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GRUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GRUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RNNCellImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) RNNCellImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RNNCellImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) RNNCellImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LSTMCellImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LSTMCellImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LSTMCellImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LSTMCellImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GRUCellImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GRUCellImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GRUCellImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GRUCellImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PixelShuffleImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PixelShuffleImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PixelShuffleImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PixelShuffleImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PixelUnshuffleImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PixelUnshuffleImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PixelUnshuffleImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PixelUnshuffleImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UpsampleImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) UpsampleImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UpsampleImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) UpsampleImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ELUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ELUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ELUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ELUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SELUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SELUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SELUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SELUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HardshrinkImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) HardshrinkImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HardshrinkImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) HardshrinkImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HardtanhImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) HardtanhImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HardtanhImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) HardtanhImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LeakyReLUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LeakyReLUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LeakyReLUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LeakyReLUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LogSigmoidImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LogSigmoidImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LogSigmoidImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LogSigmoidImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftmaxImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftmaxImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftmaxImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftmaxImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftminImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftminImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftminImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftminImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LogSoftmaxImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LogSoftmaxImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LogSoftmaxImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LogSoftmaxImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Softmax2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Softmax2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Softmax2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) Softmax2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PReLUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PReLUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PReLUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) PReLUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReLUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReLUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReLUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReLUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReLU6Impl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReLU6Impl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReLU6Impl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ReLU6Impl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RReLUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) RReLUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RReLUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) RReLUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CELUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CELUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CELUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CELUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GLUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GLUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GLUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GLUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GELUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GELUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GELUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GELUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SiLUImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SiLUImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SiLUImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SiLUImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MishImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MishImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MishImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MishImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SigmoidImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SigmoidImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SigmoidImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SigmoidImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftplusImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftplusImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftplusImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftplusImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftshrinkImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftshrinkImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftshrinkImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftshrinkImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftsignImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftsignImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftsignImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) SoftsignImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TanhImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TanhImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TanhImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TanhImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TanhshrinkImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TanhshrinkImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TanhshrinkImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TanhshrinkImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ThresholdImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ThresholdImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ThresholdImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) ThresholdImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiheadAttentionImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MultiheadAttentionImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiheadAttentionImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) MultiheadAttentionImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LayerNormImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LayerNormImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LayerNormImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LayerNormImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LocalResponseNormImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LocalResponseNormImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LocalResponseNormImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) LocalResponseNormImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CrossMapLRN2dImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CrossMapLRN2dImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CrossMapLRN2dImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) CrossMapLRN2dImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GroupNormImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GroupNormImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GroupNormImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) GroupNormImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerEncoderLayerImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerEncoderLayerImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerEncoderLayerImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerEncoderLayerImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerDecoderLayerImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerDecoderLayerImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerDecoderLayerImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerDecoderLayerImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerEncoderImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerEncoderImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerEncoderImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerEncoderImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerDecoderImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerDecoderImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerDecoderImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerDecoderImpl module);
  
  ///
  ///
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerImpl register_module(
        @StdString BytePointer name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerImpl module);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerImpl register_module(
        @StdString String name,
        @SharedPtr @Cast({"", "std::shared_ptr"}) TransformerImpl module);

  /** Registers a submodule with this {@code Module}.
   * 
   *  This method deals with {@code ModuleHolder}s.
   * 
   *  Registering a module makes it available to methods such as {@code modules()},
   *  {@code clone()} or {@code to()}.
   * 
   *  \rst
   *  .. code-block:: cpp
   * 
   *    MyModule::MyModule() {
   *      submodule_ = register_module("linear", torch::nn::Linear(3, 4));
   *    }
   *  \endrst */
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Module register_module(
        @StdString BytePointer name,
        @ByVal ModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Module register_module(
        @StdString String name,
        @ByVal ModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ModuleDictImpl register_module(
        @StdString BytePointer name,
        @ByVal ModuleDictImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ModuleDictImpl register_module(
        @StdString String name,
        @ByVal ModuleDictImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ModuleListImpl register_module(
        @StdString BytePointer name,
        @ByVal ModuleListImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ModuleListImpl register_module(
        @StdString String name,
        @ByVal ModuleListImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SequentialImpl register_module(
        @StdString BytePointer name,
        @ByVal SequentialImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SequentialImpl register_module(
        @StdString String name,
        @ByVal SequentialImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ParameterDictImpl register_module(
        @StdString BytePointer name,
        @ByVal ParameterDictImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ParameterDictImpl register_module(
        @StdString String name,
        @ByVal ParameterDictImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ParameterListImpl register_module(
        @StdString BytePointer name,
        @ByVal ParameterListImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ParameterListImpl register_module(
        @StdString String name,
        @ByVal ParameterListImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveLogSoftmaxWithLossImpl register_module(
        @StdString BytePointer name,
        @ByVal AdaptiveLogSoftmaxWithLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveLogSoftmaxWithLossImpl register_module(
        @StdString String name,
        @ByVal AdaptiveLogSoftmaxWithLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm1dImpl register_module(
        @StdString BytePointer name,
        @ByVal BatchNorm1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm1dImpl register_module(
        @StdString String name,
        @ByVal BatchNorm1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm1dImpl register_module(
        @StdString BytePointer name,
        @ByVal InstanceNorm1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm1dImpl register_module(
        @StdString String name,
        @ByVal InstanceNorm1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv1dImpl register_module(
        @StdString BytePointer name,
        @ByVal Conv1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv1dImpl register_module(
        @StdString String name,
        @ByVal Conv1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose1dImpl register_module(
        @StdString BytePointer name,
        @ByVal ConvTranspose1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose1dImpl register_module(
        @StdString String name,
        @ByVal ConvTranspose1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) DropoutImpl register_module(
        @StdString BytePointer name,
        @ByVal DropoutImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) DropoutImpl register_module(
        @StdString String name,
        @ByVal DropoutImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm2dImpl register_module(
        @StdString BytePointer name,
        @ByVal BatchNorm2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm2dImpl register_module(
        @StdString String name,
        @ByVal BatchNorm2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm2dImpl register_module(
        @StdString BytePointer name,
        @ByVal InstanceNorm2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm2dImpl register_module(
        @StdString String name,
        @ByVal InstanceNorm2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv2dImpl register_module(
        @StdString BytePointer name,
        @ByVal Conv2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv2dImpl register_module(
        @StdString String name,
        @ByVal Conv2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose2dImpl register_module(
        @StdString BytePointer name,
        @ByVal ConvTranspose2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose2dImpl register_module(
        @StdString String name,
        @ByVal ConvTranspose2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Dropout2dImpl register_module(
        @StdString BytePointer name,
        @ByVal Dropout2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Dropout2dImpl register_module(
        @StdString String name,
        @ByVal Dropout2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm3dImpl register_module(
        @StdString BytePointer name,
        @ByVal BatchNorm3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BatchNorm3dImpl register_module(
        @StdString String name,
        @ByVal BatchNorm3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm3dImpl register_module(
        @StdString BytePointer name,
        @ByVal InstanceNorm3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) InstanceNorm3dImpl register_module(
        @StdString String name,
        @ByVal InstanceNorm3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv3dImpl register_module(
        @StdString BytePointer name,
        @ByVal Conv3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Conv3dImpl register_module(
        @StdString String name,
        @ByVal Conv3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose3dImpl register_module(
        @StdString BytePointer name,
        @ByVal ConvTranspose3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConvTranspose3dImpl register_module(
        @StdString String name,
        @ByVal ConvTranspose3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Dropout3dImpl register_module(
        @StdString BytePointer name,
        @ByVal Dropout3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Dropout3dImpl register_module(
        @StdString String name,
        @ByVal Dropout3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AlphaDropoutImpl register_module(
        @StdString BytePointer name,
        @ByVal AlphaDropoutImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AlphaDropoutImpl register_module(
        @StdString String name,
        @ByVal AlphaDropoutImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FeatureAlphaDropoutImpl register_module(
        @StdString BytePointer name,
        @ByVal FeatureAlphaDropoutImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FeatureAlphaDropoutImpl register_module(
        @StdString String name,
        @ByVal FeatureAlphaDropoutImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CosineSimilarityImpl register_module(
        @StdString BytePointer name,
        @ByVal CosineSimilarityImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CosineSimilarityImpl register_module(
        @StdString String name,
        @ByVal CosineSimilarityImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PairwiseDistanceImpl register_module(
        @StdString BytePointer name,
        @ByVal PairwiseDistanceImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PairwiseDistanceImpl register_module(
        @StdString String name,
        @ByVal PairwiseDistanceImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) EmbeddingImpl register_module(
        @StdString BytePointer name,
        @ByVal EmbeddingImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) EmbeddingImpl register_module(
        @StdString String name,
        @ByVal EmbeddingImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) EmbeddingBagImpl register_module(
        @StdString BytePointer name,
        @ByVal EmbeddingBagImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) EmbeddingBagImpl register_module(
        @StdString String name,
        @ByVal EmbeddingBagImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FoldImpl register_module(
        @StdString BytePointer name,
        @ByVal FoldImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FoldImpl register_module(
        @StdString String name,
        @ByVal FoldImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UnfoldImpl register_module(
        @StdString BytePointer name,
        @ByVal UnfoldImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UnfoldImpl register_module(
        @StdString String name,
        @ByVal UnfoldImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) IdentityImpl register_module(
        @StdString BytePointer name,
        @ByVal IdentityImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) IdentityImpl register_module(
        @StdString String name,
        @ByVal IdentityImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LinearImpl register_module(
        @StdString BytePointer name,
        @ByVal LinearImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LinearImpl register_module(
        @StdString String name,
        @ByVal LinearImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BilinearImpl register_module(
        @StdString BytePointer name,
        @ByVal BilinearImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BilinearImpl register_module(
        @StdString String name,
        @ByVal BilinearImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FlattenImpl register_module(
        @StdString BytePointer name,
        @ByVal FlattenImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FlattenImpl register_module(
        @StdString String name,
        @ByVal FlattenImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UnflattenImpl register_module(
        @StdString BytePointer name,
        @ByVal UnflattenImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UnflattenImpl register_module(
        @StdString String name,
        @ByVal UnflattenImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) L1LossImpl register_module(
        @StdString BytePointer name,
        @ByVal L1LossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) L1LossImpl register_module(
        @StdString String name,
        @ByVal L1LossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) KLDivLossImpl register_module(
        @StdString BytePointer name,
        @ByVal KLDivLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) KLDivLossImpl register_module(
        @StdString String name,
        @ByVal KLDivLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MSELossImpl register_module(
        @StdString BytePointer name,
        @ByVal MSELossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MSELossImpl register_module(
        @StdString String name,
        @ByVal MSELossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BCELossImpl register_module(
        @StdString BytePointer name,
        @ByVal BCELossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BCELossImpl register_module(
        @StdString String name,
        @ByVal BCELossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HingeEmbeddingLossImpl register_module(
        @StdString BytePointer name,
        @ByVal HingeEmbeddingLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HingeEmbeddingLossImpl register_module(
        @StdString String name,
        @ByVal HingeEmbeddingLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiMarginLossImpl register_module(
        @StdString BytePointer name,
        @ByVal MultiMarginLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiMarginLossImpl register_module(
        @StdString String name,
        @ByVal MultiMarginLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CosineEmbeddingLossImpl register_module(
        @StdString BytePointer name,
        @ByVal CosineEmbeddingLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CosineEmbeddingLossImpl register_module(
        @StdString String name,
        @ByVal CosineEmbeddingLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SmoothL1LossImpl register_module(
        @StdString BytePointer name,
        @ByVal SmoothL1LossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SmoothL1LossImpl register_module(
        @StdString String name,
        @ByVal SmoothL1LossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HuberLossImpl register_module(
        @StdString BytePointer name,
        @ByVal HuberLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HuberLossImpl register_module(
        @StdString String name,
        @ByVal HuberLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiLabelMarginLossImpl register_module(
        @StdString BytePointer name,
        @ByVal MultiLabelMarginLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiLabelMarginLossImpl register_module(
        @StdString String name,
        @ByVal MultiLabelMarginLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftMarginLossImpl register_module(
        @StdString BytePointer name,
        @ByVal SoftMarginLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftMarginLossImpl register_module(
        @StdString String name,
        @ByVal SoftMarginLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiLabelSoftMarginLossImpl register_module(
        @StdString BytePointer name,
        @ByVal MultiLabelSoftMarginLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiLabelSoftMarginLossImpl register_module(
        @StdString String name,
        @ByVal MultiLabelSoftMarginLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TripletMarginLossImpl register_module(
        @StdString BytePointer name,
        @ByVal TripletMarginLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TripletMarginLossImpl register_module(
        @StdString String name,
        @ByVal TripletMarginLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TripletMarginWithDistanceLossImpl register_module(
        @StdString BytePointer name,
        @ByVal TripletMarginWithDistanceLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TripletMarginWithDistanceLossImpl register_module(
        @StdString String name,
        @ByVal TripletMarginWithDistanceLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CTCLossImpl register_module(
        @StdString BytePointer name,
        @ByVal CTCLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CTCLossImpl register_module(
        @StdString String name,
        @ByVal CTCLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PoissonNLLLossImpl register_module(
        @StdString BytePointer name,
        @ByVal PoissonNLLLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PoissonNLLLossImpl register_module(
        @StdString String name,
        @ByVal PoissonNLLLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MarginRankingLossImpl register_module(
        @StdString BytePointer name,
        @ByVal MarginRankingLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MarginRankingLossImpl register_module(
        @StdString String name,
        @ByVal MarginRankingLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) NLLLossImpl register_module(
        @StdString BytePointer name,
        @ByVal NLLLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) NLLLossImpl register_module(
        @StdString String name,
        @ByVal NLLLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CrossEntropyLossImpl register_module(
        @StdString BytePointer name,
        @ByVal CrossEntropyLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CrossEntropyLossImpl register_module(
        @StdString String name,
        @ByVal CrossEntropyLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BCEWithLogitsLossImpl register_module(
        @StdString BytePointer name,
        @ByVal BCEWithLogitsLossImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) BCEWithLogitsLossImpl register_module(
        @StdString String name,
        @ByVal BCEWithLogitsLossImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad1dImpl register_module(
        @StdString BytePointer name,
        @ByVal ReflectionPad1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad1dImpl register_module(
        @StdString String name,
        @ByVal ReflectionPad1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad1dImpl register_module(
        @StdString BytePointer name,
        @ByVal ReplicationPad1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad1dImpl register_module(
        @StdString String name,
        @ByVal ReplicationPad1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad1dImpl register_module(
        @StdString BytePointer name,
        @ByVal ConstantPad1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad1dImpl register_module(
        @StdString String name,
        @ByVal ConstantPad1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool1dImpl register_module(
        @StdString BytePointer name,
        @ByVal AvgPool1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool1dImpl register_module(
        @StdString String name,
        @ByVal AvgPool1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool1dImpl register_module(
        @StdString BytePointer name,
        @ByVal MaxPool1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool1dImpl register_module(
        @StdString String name,
        @ByVal MaxPool1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool1dImpl register_module(
        @StdString BytePointer name,
        @ByVal AdaptiveAvgPool1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool1dImpl register_module(
        @StdString String name,
        @ByVal AdaptiveAvgPool1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool1dImpl register_module(
        @StdString BytePointer name,
        @ByVal AdaptiveMaxPool1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool1dImpl register_module(
        @StdString String name,
        @ByVal AdaptiveMaxPool1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool1dImpl register_module(
        @StdString BytePointer name,
        @ByVal MaxUnpool1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool1dImpl register_module(
        @StdString String name,
        @ByVal MaxUnpool1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LPPool1dImpl register_module(
        @StdString BytePointer name,
        @ByVal LPPool1dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LPPool1dImpl register_module(
        @StdString String name,
        @ByVal LPPool1dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad2dImpl register_module(
        @StdString BytePointer name,
        @ByVal ReflectionPad2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad2dImpl register_module(
        @StdString String name,
        @ByVal ReflectionPad2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad2dImpl register_module(
        @StdString BytePointer name,
        @ByVal ReplicationPad2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad2dImpl register_module(
        @StdString String name,
        @ByVal ReplicationPad2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad2dImpl register_module(
        @StdString BytePointer name,
        @ByVal ConstantPad2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad2dImpl register_module(
        @StdString String name,
        @ByVal ConstantPad2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ZeroPad2dImpl register_module(
        @StdString BytePointer name,
        @ByVal ZeroPad2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ZeroPad2dImpl register_module(
        @StdString String name,
        @ByVal ZeroPad2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool2dImpl register_module(
        @StdString BytePointer name,
        @ByVal AvgPool2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool2dImpl register_module(
        @StdString String name,
        @ByVal AvgPool2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool2dImpl register_module(
        @StdString BytePointer name,
        @ByVal MaxPool2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool2dImpl register_module(
        @StdString String name,
        @ByVal MaxPool2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool2dImpl register_module(
        @StdString BytePointer name,
        @ByVal AdaptiveAvgPool2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool2dImpl register_module(
        @StdString String name,
        @ByVal AdaptiveAvgPool2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool2dImpl register_module(
        @StdString BytePointer name,
        @ByVal AdaptiveMaxPool2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool2dImpl register_module(
        @StdString String name,
        @ByVal AdaptiveMaxPool2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool2dImpl register_module(
        @StdString BytePointer name,
        @ByVal MaxUnpool2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool2dImpl register_module(
        @StdString String name,
        @ByVal MaxUnpool2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FractionalMaxPool2dImpl register_module(
        @StdString BytePointer name,
        @ByVal FractionalMaxPool2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FractionalMaxPool2dImpl register_module(
        @StdString String name,
        @ByVal FractionalMaxPool2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LPPool2dImpl register_module(
        @StdString BytePointer name,
        @ByVal LPPool2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LPPool2dImpl register_module(
        @StdString String name,
        @ByVal LPPool2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad3dImpl register_module(
        @StdString BytePointer name,
        @ByVal ReflectionPad3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReflectionPad3dImpl register_module(
        @StdString String name,
        @ByVal ReflectionPad3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad3dImpl register_module(
        @StdString BytePointer name,
        @ByVal ReplicationPad3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReplicationPad3dImpl register_module(
        @StdString String name,
        @ByVal ReplicationPad3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad3dImpl register_module(
        @StdString BytePointer name,
        @ByVal ConstantPad3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ConstantPad3dImpl register_module(
        @StdString String name,
        @ByVal ConstantPad3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool3dImpl register_module(
        @StdString BytePointer name,
        @ByVal AvgPool3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AvgPool3dImpl register_module(
        @StdString String name,
        @ByVal AvgPool3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool3dImpl register_module(
        @StdString BytePointer name,
        @ByVal MaxPool3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxPool3dImpl register_module(
        @StdString String name,
        @ByVal MaxPool3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool3dImpl register_module(
        @StdString BytePointer name,
        @ByVal AdaptiveAvgPool3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveAvgPool3dImpl register_module(
        @StdString String name,
        @ByVal AdaptiveAvgPool3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool3dImpl register_module(
        @StdString BytePointer name,
        @ByVal AdaptiveMaxPool3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) AdaptiveMaxPool3dImpl register_module(
        @StdString String name,
        @ByVal AdaptiveMaxPool3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool3dImpl register_module(
        @StdString BytePointer name,
        @ByVal MaxUnpool3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MaxUnpool3dImpl register_module(
        @StdString String name,
        @ByVal MaxUnpool3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FractionalMaxPool3dImpl register_module(
        @StdString BytePointer name,
        @ByVal FractionalMaxPool3dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) FractionalMaxPool3dImpl register_module(
        @StdString String name,
        @ByVal FractionalMaxPool3dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RNNImpl register_module(
        @StdString BytePointer name,
        @ByVal RNNImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RNNImpl register_module(
        @StdString String name,
        @ByVal RNNImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LSTMImpl register_module(
        @StdString BytePointer name,
        @ByVal LSTMImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LSTMImpl register_module(
        @StdString String name,
        @ByVal LSTMImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GRUImpl register_module(
        @StdString BytePointer name,
        @ByVal GRUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GRUImpl register_module(
        @StdString String name,
        @ByVal GRUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RNNCellImpl register_module(
        @StdString BytePointer name,
        @ByVal RNNCellImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RNNCellImpl register_module(
        @StdString String name,
        @ByVal RNNCellImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LSTMCellImpl register_module(
        @StdString BytePointer name,
        @ByVal LSTMCellImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LSTMCellImpl register_module(
        @StdString String name,
        @ByVal LSTMCellImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GRUCellImpl register_module(
        @StdString BytePointer name,
        @ByVal GRUCellImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GRUCellImpl register_module(
        @StdString String name,
        @ByVal GRUCellImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PixelShuffleImpl register_module(
        @StdString BytePointer name,
        @ByVal PixelShuffleImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PixelShuffleImpl register_module(
        @StdString String name,
        @ByVal PixelShuffleImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PixelUnshuffleImpl register_module(
        @StdString BytePointer name,
        @ByVal PixelUnshuffleImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PixelUnshuffleImpl register_module(
        @StdString String name,
        @ByVal PixelUnshuffleImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UpsampleImpl register_module(
        @StdString BytePointer name,
        @ByVal UpsampleImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) UpsampleImpl register_module(
        @StdString String name,
        @ByVal UpsampleImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ELUImpl register_module(
        @StdString BytePointer name,
        @ByVal ELUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ELUImpl register_module(
        @StdString String name,
        @ByVal ELUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SELUImpl register_module(
        @StdString BytePointer name,
        @ByVal SELUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SELUImpl register_module(
        @StdString String name,
        @ByVal SELUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HardshrinkImpl register_module(
        @StdString BytePointer name,
        @ByVal HardshrinkImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HardshrinkImpl register_module(
        @StdString String name,
        @ByVal HardshrinkImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HardtanhImpl register_module(
        @StdString BytePointer name,
        @ByVal HardtanhImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) HardtanhImpl register_module(
        @StdString String name,
        @ByVal HardtanhImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LeakyReLUImpl register_module(
        @StdString BytePointer name,
        @ByVal LeakyReLUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LeakyReLUImpl register_module(
        @StdString String name,
        @ByVal LeakyReLUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LogSigmoidImpl register_module(
        @StdString BytePointer name,
        @ByVal LogSigmoidImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LogSigmoidImpl register_module(
        @StdString String name,
        @ByVal LogSigmoidImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftmaxImpl register_module(
        @StdString BytePointer name,
        @ByVal SoftmaxImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftmaxImpl register_module(
        @StdString String name,
        @ByVal SoftmaxImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftminImpl register_module(
        @StdString BytePointer name,
        @ByVal SoftminImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftminImpl register_module(
        @StdString String name,
        @ByVal SoftminImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LogSoftmaxImpl register_module(
        @StdString BytePointer name,
        @ByVal LogSoftmaxImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LogSoftmaxImpl register_module(
        @StdString String name,
        @ByVal LogSoftmaxImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Softmax2dImpl register_module(
        @StdString BytePointer name,
        @ByVal Softmax2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) Softmax2dImpl register_module(
        @StdString String name,
        @ByVal Softmax2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PReLUImpl register_module(
        @StdString BytePointer name,
        @ByVal PReLUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) PReLUImpl register_module(
        @StdString String name,
        @ByVal PReLUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReLUImpl register_module(
        @StdString BytePointer name,
        @ByVal ReLUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReLUImpl register_module(
        @StdString String name,
        @ByVal ReLUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReLU6Impl register_module(
        @StdString BytePointer name,
        @ByVal ReLU6ImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ReLU6Impl register_module(
        @StdString String name,
        @ByVal ReLU6ImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RReLUImpl register_module(
        @StdString BytePointer name,
        @ByVal RReLUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) RReLUImpl register_module(
        @StdString String name,
        @ByVal RReLUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CELUImpl register_module(
        @StdString BytePointer name,
        @ByVal CELUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CELUImpl register_module(
        @StdString String name,
        @ByVal CELUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GLUImpl register_module(
        @StdString BytePointer name,
        @ByVal GLUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GLUImpl register_module(
        @StdString String name,
        @ByVal GLUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GELUImpl register_module(
        @StdString BytePointer name,
        @ByVal GELUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GELUImpl register_module(
        @StdString String name,
        @ByVal GELUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SiLUImpl register_module(
        @StdString BytePointer name,
        @ByVal SiLUImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SiLUImpl register_module(
        @StdString String name,
        @ByVal SiLUImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MishImpl register_module(
        @StdString BytePointer name,
        @ByVal MishImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MishImpl register_module(
        @StdString String name,
        @ByVal MishImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SigmoidImpl register_module(
        @StdString BytePointer name,
        @ByVal SigmoidImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SigmoidImpl register_module(
        @StdString String name,
        @ByVal SigmoidImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftplusImpl register_module(
        @StdString BytePointer name,
        @ByVal SoftplusImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftplusImpl register_module(
        @StdString String name,
        @ByVal SoftplusImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftshrinkImpl register_module(
        @StdString BytePointer name,
        @ByVal SoftshrinkImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftshrinkImpl register_module(
        @StdString String name,
        @ByVal SoftshrinkImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftsignImpl register_module(
        @StdString BytePointer name,
        @ByVal SoftsignImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) SoftsignImpl register_module(
        @StdString String name,
        @ByVal SoftsignImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TanhImpl register_module(
        @StdString BytePointer name,
        @ByVal TanhImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TanhImpl register_module(
        @StdString String name,
        @ByVal TanhImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TanhshrinkImpl register_module(
        @StdString BytePointer name,
        @ByVal TanhshrinkImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TanhshrinkImpl register_module(
        @StdString String name,
        @ByVal TanhshrinkImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ThresholdImpl register_module(
        @StdString BytePointer name,
        @ByVal ThresholdImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) ThresholdImpl register_module(
        @StdString String name,
        @ByVal ThresholdImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiheadAttentionImpl register_module(
        @StdString BytePointer name,
        @ByVal MultiheadAttentionImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) MultiheadAttentionImpl register_module(
        @StdString String name,
        @ByVal MultiheadAttentionImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LayerNormImpl register_module(
        @StdString BytePointer name,
        @ByVal LayerNormImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LayerNormImpl register_module(
        @StdString String name,
        @ByVal LayerNormImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LocalResponseNormImpl register_module(
        @StdString BytePointer name,
        @ByVal LocalResponseNormImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) LocalResponseNormImpl register_module(
        @StdString String name,
        @ByVal LocalResponseNormImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CrossMapLRN2dImpl register_module(
        @StdString BytePointer name,
        @ByVal CrossMapLRN2dImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) CrossMapLRN2dImpl register_module(
        @StdString String name,
        @ByVal CrossMapLRN2dImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GroupNormImpl register_module(
        @StdString BytePointer name,
        @ByVal GroupNormImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) GroupNormImpl register_module(
        @StdString String name,
        @ByVal GroupNormImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerEncoderLayerImpl register_module(
        @StdString BytePointer name,
        @ByVal TransformerEncoderLayerImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerEncoderLayerImpl register_module(
        @StdString String name,
        @ByVal TransformerEncoderLayerImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerDecoderLayerImpl register_module(
        @StdString BytePointer name,
        @ByVal TransformerDecoderLayerImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerDecoderLayerImpl register_module(
        @StdString String name,
        @ByVal TransformerDecoderLayerImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerEncoderImpl register_module(
        @StdString BytePointer name,
        @ByVal TransformerEncoderImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerEncoderImpl register_module(
        @StdString String name,
        @ByVal TransformerEncoderImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerDecoderImpl register_module(
        @StdString BytePointer name,
        @ByVal TransformerDecoderImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerDecoderImpl register_module(
        @StdString String name,
        @ByVal TransformerDecoderImplModuleHolder module_holder);
  
  ///
  ///
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerImpl register_module(
        @StdString BytePointer name,
        @ByVal TransformerImplModuleHolder module_holder);
  public native @SharedPtr @Name("register_module") @Cast({"", "std::shared_ptr"}) TransformerImpl register_module(
        @StdString String name,
        @ByVal TransformerImplModuleHolder module_holder);

  /** Replaces a registered submodule with this {@code Module}.
   * 
   *  This takes care of the registration, if you used submodule members, you
   *  should */
  //  assign the submodule as well, i.e. use as
  /**     module->submodule_ = module->replace_module("linear",
  /**     torch::nn::Linear(3, 4));
  /** It only works when a module of the name is already registered.
  /**
  /** This is useful for replacing a module after initialization, e.g.
  /** for finetuning. */

  /** Replaces a registered submodule with this {@code Module}.
   *  This method deals with {@code ModuleHolder}s.
   * 
   *  This takes care of the registration, if you used submodule members, you
   *  should */
  //  assign the submodule as well, i.e. use as
  /**     module->submodule_ = module->replace_module("linear", linear_holder);
  /** It only works when a module of the name is already registered.
  /**
  /** This is useful for replacing a module after initialization, e.g.
  /** for finetuning. */

  /** Unregisters a submodule from this {@code Module}. If there is no such module
   *  with {@code name} an exception is thrown. */
  public native void unregister_module(@StdString BytePointer name);
  public native void unregister_module(@StdString String name);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy