jactorch.nn.container#

Classes

Class SequentialN

class SequentialN[source]#

Bases: Sequential

__add__(other)#
Return type:

Sequential

__init__(*args)#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

__mul__(other)#
Parameters:

other (int)

Return type:

Sequential

append(module)#

Append a given module to the end.

Parameters:

module (nn.Module) – module to append

Return type:

Sequential

extend(sequential)#
Return type:

Sequential

forward(*inputs, return_all=False)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

insert(index, module)#
Parameters:
Return type:

Sequential

pop(key)#
Parameters:

key (int | slice)

Return type:

Module