Identity module
Identity
Bases: Module
Identity module.
This module should be used as a placeholder when no operation is to be
performed. The module just returns its inputs
argument as output.
This module can be really usefull during development process in order to implement the whole program architecture before the individual modules.
It avoid any data models naming issue that you could have by just forwarding the inputs, that way you can implement the general program architecture, validate it and implement the individual modules later.
Example:
import synalinks
class MyAwesomeModule(synalinks.Program):
def __init__(
name=None,
description=None,
trainable=True,
):
super().__init__(
name=name,
description=description,
trainable=trainable,
)
async def build(self, inputs):
outputs = await synalinks.Identity()(inputs)
super().__init__(
inputs=inputs,
outputs=outputs,
name=self.name,
description=self.description,
trainable=self.trainable,
)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
keyword arguments
|
The default module's arguments |
{}
|