All docs
Docs/ API Reference/ lsdtools.neural reference
API Reference

lsdtools.neural reference

Generated public SDK reference for lsdtools.neural.

SDK distribution 1.0.0; API contract 1.0; generator 1.0.0.

Product source digest: 4ea39055732e8883c03ccfecf12af6ccebd2041a12ce1b843e4a769e200f5ef9.

Generated from declared public exports and source syntax. Signatures and annotations are declaration spellings; decorators, factories and annotations are never executed. Class members below are declared members; base classes remain explicit. Source docstrings describe their owning implementation; they do not grant app permissions.

text
Lazy public facade for authenticated neural execution.

Importing this module does not import NumPy, load a native artifact, initialize
CUDA, or import the product runtime. Domain packages use this facade instead of
importing :mod:`lsd_neural_engine` directly.

lsdtools.neural.ADD_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:19.

Python
ADD_NUMERICAL_CONTRACT = 'lsd-deeplearning-python-add-v1'

lsdtools.neural.AVG_POOL2_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:20.

Python
AVG_POOL2_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-avg-pool2-v1'

lsdtools.neural.BATCH_NORM_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:21.

Python
BATCH_NORM_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-batchnorm-v1'

lsdtools.neural.BCE_LOSS_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:22.

Python
BCE_LOSS_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-bce-loss-v1'

lsdtools.neural.BINARY_CROSS_ENTROPY_WITH_LOGITS_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:96.

Python
BINARY_CROSS_ENTROPY_WITH_LOGITS_CONTRACT = 'lsd-neural-engine-binary-cross-entropy-with-logits-f32-v1'

lsdtools.neural.Backend#

Kind: value. Source: sdk/src/lsdtools/neural.py:18.

Python
Backend = Literal['auto', 'reference', 'cpu', 'cuda']

lsdtools.neural.CLIP_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:36.

Python
CLIP_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-clip-v1'

lsdtools.neural.COMBINED_LOSS_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:24.

Python
COMBINED_LOSS_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-combined-loss-v1'

lsdtools.neural.CONCAT_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:37.

Python
CONCAT_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-concat-v1'

lsdtools.neural.DICE_LOSS_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:30.

Python
DICE_LOSS_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-dice-loss-v1'

lsdtools.neural.ELU_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:38.

Python
ELU_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-elu-v1'

lsdtools.neural.FLATTEN_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:42.

Python
FLATTEN_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-flatten-v1'

lsdtools.neural.FOCAL_LOSS_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:32.

Python
FOCAL_LOSS_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-focal-loss-v1'

lsdtools.neural.FORWARD_STATELESS#

Kind: value. Source: sdk/src/lsdtools/neural.py:153.

Python
FORWARD_STATELESS = 'forward.stateless.v1'

lsdtools.neural.GELU_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:39.

Python
GELU_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-gelu-v1'

lsdtools.neural.GLOBAL_AVERAGE_POOL_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:43.

Python
GLOBAL_AVERAGE_POOL_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-global-average-pool-v1'

lsdtools.neural.GRU_NTD_F32_V1#

Kind: value. Source: sdk/src/lsdtools/neural.py:114.

Python
GRU_NTD_F32_V1 = 'lsd.nn.gru-ntd-f32-v1'

lsdtools.neural.HARD_SIGMOID_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:49.

Python
HARD_SIGMOID_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-hard-sigmoid-v1'

lsdtools.neural.IDENTITY_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:40.

Python
IDENTITY_NUMERICAL_CONTRACT = 'lsd-deeplearning-python-identity-v1'

lsdtools.neural.INDEXED_SOFTMAX_CROSS_ENTROPY_F32_V1#

Kind: value. Source: sdk/src/lsdtools/neural.py:99.

Python
INDEXED_SOFTMAX_CROSS_ENTROPY_F32_V1 = 'lsd-neural-engine-indexed-softmax-cross-entropy-f32-v1'

lsdtools.neural.LAYER_NORM_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:34.

Python
LAYER_NORM_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-layernorm-v1'

lsdtools.neural.LEAKY_RELU_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:41.

Python
LEAKY_RELU_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-leaky-relu-v1'

lsdtools.neural.LENET_ARCHITECTURE_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:84.

Python
LENET_ARCHITECTURE_VERSION = 'lsd-neural-engine-lenet-relu-maxpool-nchw-f32-v1'

lsdtools.neural.LENET_INPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:87.

Python
LENET_INPUT = 'images'

lsdtools.neural.LENET_MIN_SPATIAL#

Kind: value. Source: sdk/src/lsdtools/neural.py:88.

Python
LENET_MIN_SPATIAL = 16

lsdtools.neural.LENET_OUTPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:89.

Python
LENET_OUTPUT = 'logits'

lsdtools.neural.LINEAR_MODEL_ARCHITECTURE_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:76.

Python
LINEAR_MODEL_ARCHITECTURE_VERSION = 'lsd-neural-engine-linear-model-nc-f32-v1'

lsdtools.neural.LINEAR_MODEL_INPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:77.

Python
LINEAR_MODEL_INPUT = 'features'

lsdtools.neural.LINEAR_MODEL_OUTPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:78.

Python
LINEAR_MODEL_OUTPUT = 'prediction'

lsdtools.neural.LSTM_NTD_F32_V1#

Kind: value. Source: sdk/src/lsdtools/neural.py:115.

Python
LSTM_NTD_F32_V1 = 'lsd.nn.lstm-ntd-f32-v1'

lsdtools.neural.MAX_POOL2_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:35.

Python
MAX_POOL2_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-max-pool2-v1'

lsdtools.neural.MEAN_SQUARED_ERROR_F32_V1#

Kind: value. Source: sdk/src/lsdtools/neural.py:95.

Python
MEAN_SQUARED_ERROR_F32_V1 = 'lsd-neural-engine-mean-squared-error-f32-v1'

lsdtools.neural.MUL_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:58.

Python
MUL_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-mul-v1'

lsdtools.neural.NeuralServiceUnavailable#

Kind: class. Source: sdk/src/lsdtools/neural.py:563.

Python
NeuralServiceUnavailable(self, detail: str | None=None) -> None

Source docstring:

text
The installed product lacks a compatible neural runtime.

Declared bases: RuntimeError.

lsdtools.neural.NeuralServiceUnavailable.__init__#

Kind: method. Source: sdk/src/lsdtools/neural.py:566.

Python
__init__(self, detail: str | None=None) -> None
Python
detail: str | None
self: (unannotated)

lsdtools.neural.PAD_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:52.

Python
PAD_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-pad-v1'

lsdtools.neural.RECURRENT_MODEL_ARCHITECTURE_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:116.

Python
RECURRENT_MODEL_ARCHITECTURE_VERSION = 'lsd-neural-engine-recurrent-cell-ntd-f32-v1'

lsdtools.neural.RECURRENT_MODEL_INPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:119.

Python
RECURRENT_MODEL_INPUT = 'sequence'

lsdtools.neural.RECURRENT_MODEL_OUTPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:120.

Python
RECURRENT_MODEL_OUTPUT = 'hidden'

lsdtools.neural.RELU_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:53.

Python
RELU_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-relu-v1'

lsdtools.neural.RESIDENT_CAPABILITIES_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:148.

Python
RESIDENT_CAPABILITIES_CONTRACT = 'lsd-neural-engine-resident-capabilities-v1'

lsdtools.neural.RESIDENT_MODEL_MAX_DEVICE#

Kind: value. Source: sdk/src/lsdtools/neural.py:106.

Python
RESIDENT_MODEL_MAX_DEVICE = 2 ** 31 - 1

lsdtools.neural.RESIDENT_MODEL_MAX_PARAMETER_BYTES#

Kind: value. Source: sdk/src/lsdtools/neural.py:109.

Python
RESIDENT_MODEL_MAX_PARAMETER_BYTES = 200000000

lsdtools.neural.RESIDENT_MODEL_MAX_PARAMETER_ELEMENTS#

Kind: value. Source: sdk/src/lsdtools/neural.py:108.

Python
RESIDENT_MODEL_MAX_PARAMETER_ELEMENTS = 50000000

lsdtools.neural.RESIDENT_MODEL_MAX_SNAPSHOT_BYTES#

Kind: value. Source: sdk/src/lsdtools/neural.py:110.

Python
RESIDENT_MODEL_MAX_SNAPSHOT_BYTES = 300000000

lsdtools.neural.RESIDENT_MODEL_MAX_WORKERS#

Kind: value. Source: sdk/src/lsdtools/neural.py:107.

Python
RESIDENT_MODEL_MAX_WORKERS = 256

lsdtools.neural.RESIDENT_MODEL_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:102.

Python
RESIDENT_MODEL_NUMERICAL_CONTRACT = 'lsd-neural-engine-resident-model-v2'

lsdtools.neural.RESIDENT_MODEL_PROVIDER#

Kind: value. Source: sdk/src/lsdtools/neural.py:103.

Python
RESIDENT_MODEL_PROVIDER = 'numpy-declarative-model-reference-v1'

lsdtools.neural.RESIDENT_MODEL_SNAPSHOT_FORMAT#

Kind: value. Source: sdk/src/lsdtools/neural.py:104.

Python
RESIDENT_MODEL_SNAPSHOT_FORMAT = 'lsd-neural-engine-resident-model-state'

lsdtools.neural.RESIDENT_MODEL_SNAPSHOT_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:105.

Python
RESIDENT_MODEL_SNAPSHOT_VERSION = 1

lsdtools.neural.RESIDENT_RECURRENT_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:121.

Python
RESIDENT_RECURRENT_NUMERICAL_CONTRACT = 'lsd-neural-engine-resident-recurrent-v1'

lsdtools.neural.RESIDENT_RECURRENT_PROVIDER#

Kind: value. Source: sdk/src/lsdtools/neural.py:124.

Python
RESIDENT_RECURRENT_PROVIDER = 'numpy-fused-recurrent-reference-v1'

lsdtools.neural.RESIDENT_RECURRENT_SNAPSHOT_FORMAT#

Kind: value. Source: sdk/src/lsdtools/neural.py:125.

Python
RESIDENT_RECURRENT_SNAPSHOT_FORMAT = 'lsd-neural-engine-resident-recurrent-state'

lsdtools.neural.RESIDENT_RECURRENT_SNAPSHOT_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:128.

Python
RESIDENT_RECURRENT_SNAPSHOT_VERSION = 1

lsdtools.neural.RESIDENT_SDK_PUBLICATION_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:111.

Python
RESIDENT_SDK_PUBLICATION_CONTRACT = 'lsd-neural-engine-resident-sdk-publication-v1'

lsdtools.neural.RESIDENT_SEGMENTER_MAX_DEPTH#

Kind: value. Source: sdk/src/lsdtools/neural.py:72.

Python
RESIDENT_SEGMENTER_MAX_DEPTH = 32

lsdtools.neural.RESIDENT_SEGMENTER_MAX_DEVICE#

Kind: value. Source: sdk/src/lsdtools/neural.py:74.

Python
RESIDENT_SEGMENTER_MAX_DEVICE = 2 ** 31 - 1

lsdtools.neural.RESIDENT_SEGMENTER_MAX_HIDDEN#

Kind: value. Source: sdk/src/lsdtools/neural.py:71.

Python
RESIDENT_SEGMENTER_MAX_HIDDEN = 128

lsdtools.neural.RESIDENT_SEGMENTER_MAX_SEED#

Kind: value. Source: sdk/src/lsdtools/neural.py:73.

Python
RESIDENT_SEGMENTER_MAX_SEED = 2 ** 64 - 1

lsdtools.neural.RESIDENT_SEGMENTER_MAX_WORKERS#

Kind: value. Source: sdk/src/lsdtools/neural.py:75.

Python
RESIDENT_SEGMENTER_MAX_WORKERS = 256

lsdtools.neural.RESIDENT_SEGMENTER_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:61.

Python
RESIDENT_SEGMENTER_NUMERICAL_CONTRACT = 'lsd-neural-engine-resident-segmenter-v1'

lsdtools.neural.RESIDENT_SEGMENTER_PROVIDER#

Kind: value. Source: sdk/src/lsdtools/neural.py:68.

Python
RESIDENT_SEGMENTER_PROVIDER = 'numpy-pcg64-resident-segmenter-reference-v1'

lsdtools.neural.RESIDENT_SEGMENTER_SNAPSHOT_FORMAT#

Kind: value. Source: sdk/src/lsdtools/neural.py:64.

Python
RESIDENT_SEGMENTER_SNAPSHOT_FORMAT = 'lsd-neural-engine-resident-segmenter-state'

lsdtools.neural.RESIDENT_SEGMENTER_SNAPSHOT_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:67.

Python
RESIDENT_SEGMENTER_SNAPSHOT_VERSION = 1

lsdtools.neural.RESIDENT_TRANSFORMER_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:138.

Python
RESIDENT_TRANSFORMER_NUMERICAL_CONTRACT = 'lsd-neural-engine-resident-decoder-transformer-v1'

lsdtools.neural.RESIDENT_TRANSFORMER_PROVIDER#

Kind: value. Source: sdk/src/lsdtools/neural.py:141.

Python
RESIDENT_TRANSFORMER_PROVIDER = 'numpy-fused-decoder-transformer-reference-v1'

lsdtools.neural.RESIDENT_TRANSFORMER_SNAPSHOT_FORMAT#

Kind: value. Source: sdk/src/lsdtools/neural.py:144.

Python
RESIDENT_TRANSFORMER_SNAPSHOT_FORMAT = 'lsd-neural-engine-resident-transformer-state'

lsdtools.neural.RESIDENT_TRANSFORMER_SNAPSHOT_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:147.

Python
RESIDENT_TRANSFORMER_SNAPSHOT_VERSION = 1

lsdtools.neural.RESIDUAL_CLASSIFIER_ARCHITECTURE_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:90.

Python
RESIDUAL_CLASSIFIER_ARCHITECTURE_VERSION = 'lsd-neural-engine-two-block-residual-classifier-nchw-f32-v1'

lsdtools.neural.RESIDUAL_CLASSIFIER_INPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:93.

Python
RESIDUAL_CLASSIFIER_INPUT = 'images'

lsdtools.neural.RESIDUAL_CLASSIFIER_OUTPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:94.

Python
RESIDUAL_CLASSIFIER_OUTPUT = 'logits'

lsdtools.neural.SESSION_CAUSAL_LM#

Kind: value. Source: sdk/src/lsdtools/neural.py:150.

Python
SESSION_CAUSAL_LM = 'causal-lm'

lsdtools.neural.SESSION_DECLARATIVE_MODEL#

Kind: value. Source: sdk/src/lsdtools/neural.py:149.

Python
SESSION_DECLARATIVE_MODEL = 'declarative-model'

lsdtools.neural.SESSION_RECURRENT_MODEL#

Kind: value. Source: sdk/src/lsdtools/neural.py:151.

Python
SESSION_RECURRENT_MODEL = 'recurrent-model'

lsdtools.neural.SESSION_TRANSFORMER_MODEL#

Kind: value. Source: sdk/src/lsdtools/neural.py:152.

Python
SESSION_TRANSFORMER_MODEL = 'decoder-transformer-model'

lsdtools.neural.SIGMOID_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:54.

Python
SIGMOID_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-sigmoid-v1'

lsdtools.neural.SOFTMAX_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:56.

Python
SOFTMAX_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-softmax-v1'

lsdtools.neural.SOFTPLUS_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:55.

Python
SOFTPLUS_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-softplus-v1'

lsdtools.neural.SUB_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:59.

Python
SUB_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-sub-v1'

lsdtools.neural.TANH_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:57.

Python
TANH_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-tanh-v1'

lsdtools.neural.TRANSFORMER_CAUSAL_LM_LOSS_V1#

Kind: value. Source: sdk/src/lsdtools/neural.py:129.

Python
TRANSFORMER_CAUSAL_LM_LOSS_V1 = 'lsd-neural-engine-transformer-causal-lm-cross-entropy-v1'

lsdtools.neural.TRANSFORMER_MODEL_ARCHITECTURE_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:132.

Python
TRANSFORMER_MODEL_ARCHITECTURE_VERSION = 'lsd-neural-engine-decoder-transformer-ntv-f32-v1'

lsdtools.neural.TRANSFORMER_MODEL_INPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:135.

Python
TRANSFORMER_MODEL_INPUT = 'tokens'

lsdtools.neural.TRANSFORMER_MODEL_OUTPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:136.

Python
TRANSFORMER_MODEL_OUTPUT = 'logits'

lsdtools.neural.TRANSFORMER_MODEL_TARGET#

Kind: value. Source: sdk/src/lsdtools/neural.py:137.

Python
TRANSFORMER_MODEL_TARGET = 'targets'

lsdtools.neural.TWO_LAYER_MLP_ARCHITECTURE_VERSION#

Kind: value. Source: sdk/src/lsdtools/neural.py:79.

Python
TWO_LAYER_MLP_ARCHITECTURE_VERSION = 'lsd-neural-engine-two-layer-mlp-nc-f32-v1'

lsdtools.neural.TWO_LAYER_MLP_INPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:82.

Python
TWO_LAYER_MLP_INPUT = 'features'

lsdtools.neural.TWO_LAYER_MLP_OUTPUT#

Kind: value. Source: sdk/src/lsdtools/neural.py:83.

Python
TWO_LAYER_MLP_OUTPUT = 'logits'

lsdtools.neural.UPSAMPLE2_NUMERICAL_CONTRACT#

Kind: value. Source: sdk/src/lsdtools/neural.py:60.

Python
UPSAMPLE2_NUMERICAL_CONTRACT = 'lsd-deeplearning-numpy-upsample2-v1'

lsdtools.neural.adapt_resident_session#

Kind: function. Source: sdk/src/lsdtools/neural.py:4630.

Python
adapt_resident_session(session: Any) -> Any
Python
session: Any

lsdtools.neural.add_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5696.

Python
add_backward(gradient: Any, input_count: int, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
input_count: int
workers: int | None

Source docstring:

text
Return a fresh list containing the exact gradient alias per input.

lsdtools.neural.add_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5651.

Python
add_forward(xs: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
workers: int | None
xs: Any

Source docstring:

text
Execute Add's exact ``len(xs)`` followed by builtin ``sum(xs)``.

lsdtools.neural.add_forward_after_len#

Kind: function. Source: sdk/src/lsdtools/neural.py:5672.

Python
add_forward_after_len(xs: Any, input_count: int, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
input_count: int
workers: int | None
xs: Any

Source docstring:

text
Execute builtin ``sum(xs)`` after the caller has committed ``len``.

lsdtools.neural.avg_pool2_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6006.

Python
avg_pool2_backward(gradient: Any, state_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
state_token: Any
workers: int | None

Source docstring:

text
Read one live AvgPool2 state and execute its literal derivative.

lsdtools.neural.avg_pool2_backward_after_state_reads#

Kind: function. Source: sdk/src/lsdtools/neural.py:6029.

Python
avg_pool2_backward_after_state_reads(gradient: Any, state_token: Any, *, padded_shape: Any, output_height: Any, output_width: Any, height: Any, width: Any, pad_top: Any, pad_left: Any, divisor: Any, stride_height: Any, stride_width: Any, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
divisor: Any
gradient: Any
height: Any
output_height: Any
output_width: Any
pad_left: Any
pad_top: Any
padded_shape: Any
state_token: Any
stride_height: Any
stride_width: Any
width: Any
workers: int | None

Source docstring:

text
Continue after exact package-owned cache, shape, and stride reads.

lsdtools.neural.avg_pool2_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5952.

Python
avg_pool2_forward(values: Any, kernel: Any=2, stride: Any=None, pad: Any=(0, 0, 0, 0), ceil_mode: Any=False, count_include_pad: Any=False, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
ceil_mode: Any
count_include_pad: Any
device: int
kernel: Any
pad: Any
stride: Any
values: Any
workers: int | None

Source docstring:

text
Construct exact legacy state and execute one AvgPool2 pass.

lsdtools.neural.avg_pool2_forward_with_state#

Kind: function. Source: sdk/src/lsdtools/neural.py:5983.

Python
avg_pool2_forward_with_state(values: Any, state_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
state_token: Any
values: Any
workers: int | None

Source docstring:

text
Execute forward on one caller-owned mutable AvgPool2 state.

lsdtools.neural.batch_norm_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6120.

Python
batch_norm_backward(gradient: Any, state_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
state_token: Any
workers: int | None

Source docstring:

text
Use one caller-owned BatchNorm state's live cached scale.

lsdtools.neural.batch_norm_backward_after_scale_read#

Kind: function. Source: sdk/src/lsdtools/neural.py:6148.

Python
batch_norm_backward_after_scale_read(gradient: Any, state_token: Any, expanded_scale: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
expanded_scale: Any
gradient: Any
state_token: Any
workers: int | None

Source docstring:

text
Continue BatchNorm backward with its already captured scale view.

lsdtools.neural.batch_norm_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:5006.

Python
batch_norm_contract_types() -> tuple[type, type, type, type]

Source docstring:

text
Return the exact installed BatchNorm result/provenance record types.

lsdtools.neural.batch_norm_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6072.

Python
batch_norm_forward(values: Any, channels: Any, eps: Any=1e-05, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
channels: Any
device: int
eps: Any
values: Any
workers: int | None

Source docstring:

text
Construct exact legacy state and execute one BatchNorm pass.

lsdtools.neural.batch_norm_forward_with_state#

Kind: function. Source: sdk/src/lsdtools/neural.py:6097.

Python
batch_norm_forward_with_state(values: Any, state_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
state_token: Any
values: Any
workers: int | None

Source docstring:

text
Execute forward on one caller-owned mutable BatchNorm state.

lsdtools.neural.bce_loss#

Kind: function. Source: sdk/src/lsdtools/neural.py:5198.

Python
bce_loss(prob: Any, gt: Any, eps: Any=1e-07, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
eps: Any
gt: Any
prob: Any
workers: int | None

Source docstring:

text
Execute literal BCE before service control interpretation.

lsdtools.neural.bce_loss_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:1106.

Python
bce_loss_contract_types() -> tuple[type, type, type]

Source docstring:

text
Return exact installed BCE result, provenance, and descriptor types.

lsdtools.neural.binary_logistic_regression_loss#

Kind: function. Source: sdk/src/lsdtools/neural.py:3613.

Python
binary_logistic_regression_loss() -> Any

Source docstring:

text
Return the exact installed binary BCE-with-logits loss binding.

lsdtools.neural.build_lenet#

Kind: function. Source: sdk/src/lsdtools/neural.py:3690.

Python
build_lenet(config: Any) -> Any
Python
config: Any

Source docstring:

text
Build the released classic Conv/ReLU/MaxPool LeNet graph.

lsdtools.neural.build_linear_model#

Kind: function. Source: sdk/src/lsdtools/neural.py:3599.

Python
build_linear_model(config: Any) -> Any
Python
config: Any

Source docstring:

text
Build the released static Linear model from its exact config type.

lsdtools.neural.build_model_session#

Kind: function. Source: sdk/src/lsdtools/neural.py:3634.

Python
build_model_session(model: Any, seed: int, backend: Backend='reference', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
model: Any
seed: int
workers: int | None

Source docstring:

text
Build a resident model session through complete-plan selection.

lsdtools.neural.build_recurrent_model#

Kind: function. Source: sdk/src/lsdtools/neural.py:4519.

Python
build_recurrent_model(config: Any) -> Any
Python
config: Any

lsdtools.neural.build_recurrent_session#

Kind: function. Source: sdk/src/lsdtools/neural.py:4529.

Python
build_recurrent_session(model: Any, seed: int, backend: Backend='reference', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
model: Any
seed: int
workers: int | None

lsdtools.neural.build_residual_classifier#

Kind: function. Source: sdk/src/lsdtools/neural.py:3697.

Python
build_residual_classifier(config: Any) -> Any
Python
config: Any

Source docstring:

text
Build the released static two-block residual classifier.

lsdtools.neural.build_segmenter_session#

Kind: function. Source: sdk/src/lsdtools/neural.py:2977.

Python
build_segmenter_session(hidden: int, depth: int, seed: int, backend: Backend='reference', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
depth: int
device: int
hidden: int
seed: int
workers: int | None

Source docstring:

text
Build a resident session without interpreting any service control.

lsdtools.neural.build_transformer_model#

Kind: function. Source: sdk/src/lsdtools/neural.py:4567.

Python
build_transformer_model(config: Any) -> Any
Python
config: Any

lsdtools.neural.build_transformer_session#

Kind: function. Source: sdk/src/lsdtools/neural.py:4572.

Python
build_transformer_session(model: Any, seed: int, backend: Backend='reference', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
model: Any
seed: int
workers: int | None

lsdtools.neural.build_two_layer_mlp#

Kind: function. Source: sdk/src/lsdtools/neural.py:3620.

Python
build_two_layer_mlp(config: Any) -> Any
Python
config: Any

Source docstring:

text
Build the released static two-Linear multiclass MLP.

lsdtools.neural.capabilities#

Kind: function. Source: sdk/src/lsdtools/neural.py:5189.

Python
capabilities(*, device: int=0) -> dict[str, Any]
Python
device: int

Source docstring:

text
Report migrated operations and authenticated provider availability.

lsdtools.neural.clip_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6923.

Python
clip_backward(gradient: Any, cached_input: Any, min_val: Any=0.0, max_val: Any=6.0, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
cached_input: Any
device: int
gradient: Any
max_val: Any
min_val: Any
workers: int | None

Source docstring:

text
Use one input token for both strict Clip cache comparisons.

lsdtools.neural.clip_backward_after_cache_reads#

Kind: function. Source: sdk/src/lsdtools/neural.py:6950.

Python
clip_backward_after_cache_reads(gradient: Any, first_cached_input: Any, second_cached_input: Any, min_val: Any=0.0, max_val: Any=6.0, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
first_cached_input: Any
gradient: Any
max_val: Any
min_val: Any
second_cached_input: Any
workers: int | None

Source docstring:

text
Continue backward after both live Clip cache reads were captured.

lsdtools.neural.clip_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6898.

Python
clip_forward(values: Any, min_val: Any=0.0, max_val: Any=6.0, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
max_val: Any
min_val: Any
values: Any
workers: int | None

Source docstring:

text
Execute literal Clip while preserving both exact bound tokens.

lsdtools.neural.combined_loss#

Kind: function. Source: sdk/src/lsdtools/neural.py:5614.

Python
combined_loss(prob: Any, gt: Any, config: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
config: Any
device: int
gt: Any
prob: Any
workers: int | None

Source docstring:

text
Execute one complete composite literal before runtime controls.

lsdtools.neural.combined_loss_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:2459.

Python
combined_loss_contract_types() -> tuple[type, type, type, type]

lsdtools.neural.concat_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5764.

Python
concat_backward(gradient: Any, sizes: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
sizes: Any
workers: int | None

Source docstring:

text
Split one gradient into channel-slice views using a live sizes token.

lsdtools.neural.concat_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5720.

Python
concat_forward(xs: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
workers: int | None
xs: Any

Source docstring:

text
Execute Concat's shape prepass followed by channel concatenation.

lsdtools.neural.concat_forward_after_sizes#

Kind: function. Source: sdk/src/lsdtools/neural.py:5741.

Python
concat_forward_after_sizes(xs: Any, sizes: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
sizes: Any
workers: int | None
xs: Any

Source docstring:

text
Continue Concat after the caller committed its mutable sizes token.

lsdtools.neural.dice_loss#

Kind: function. Source: sdk/src/lsdtools/neural.py:5283.

Python
dice_loss(prob: Any, gt: Any, eps: Any=1.0, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
eps: Any
gt: Any
prob: Any
workers: int | None

Source docstring:

text
Execute the complete literal before service control interpretation.

lsdtools.neural.dice_loss_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:1551.

Python
dice_loss_contract_types() -> tuple[type, type, type]

lsdtools.neural.elu_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7002.

Python
elu_backward(gradient: Any, cached_input: Any, alpha: Any=1.0, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
alpha: Any
backend: Backend
cached_input: Any
device: int
gradient: Any
workers: int | None

Source docstring:

text
Execute the literal ELU derivative from one live input token.

lsdtools.neural.elu_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6979.

Python
elu_forward(values: Any, alpha: Any=1.0, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
alpha: Any
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Execute literal eager ELU with an explicit live alpha token.

lsdtools.neural.flatten_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5879.

Python
flatten_backward(gradient: Any, shape_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
shape_token: Any
workers: int | None

Source docstring:

text
Reshape one gradient using an explicit forward-shape token.

lsdtools.neural.flatten_backward_after_lookup#

Kind: function. Source: sdk/src/lsdtools/neural.py:5902.

Python
flatten_backward_after_lookup(gradient: Any, reshape: Any, shape_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
reshape: Any
shape_token: Any
workers: int | None

Source docstring:

text
Continue backward after the package retrieved ``gradient.reshape``.

lsdtools.neural.flatten_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5829.

Python
flatten_forward(x: Any, axis: Any=1, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
axis: Any
backend: Backend
device: int
workers: int | None
x: Any

Source docstring:

text
Execute Flatten constructor conversion and literal forward reshape.

lsdtools.neural.flatten_forward_after_shape#

Kind: function. Source: sdk/src/lsdtools/neural.py:5852.

Python
flatten_forward_after_shape(x: Any, shape_token: Any, *, axis: int, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
axis: int
backend: Backend
device: int
shape_token: Any
workers: int | None
x: Any

Source docstring:

text
Continue Flatten after its package layer cached the first shape.

lsdtools.neural.focal_loss#

Kind: function. Source: sdk/src/lsdtools/neural.py:5485.

Python
focal_loss(prob: Any, gt: Any, alpha: Any=0.8, gamma: Any=2.0, eps: Any=1e-07, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
alpha: Any
backend: Backend
device: int
eps: Any
gamma: Any
gt: Any
prob: Any
workers: int | None

Source docstring:

text
Execute the complete Focal literal before control interpretation.

lsdtools.neural.focal_loss_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:1958.

Python
focal_loss_contract_types() -> tuple[type, type, type]

lsdtools.neural.gelu_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7048.

Python
gelu_backward(gradient: Any, cached_input: Any, cached_tanh: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
cached_input: Any
cached_tanh: Any
device: int
gradient: Any
workers: int | None

Source docstring:

text
Differentiate GELU from the exact input and cached-tanh tokens.

lsdtools.neural.gelu_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7027.

Python
gelu_forward(values: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Execute the GPT-style tanh GELU and expose all forward caches.

lsdtools.neural.global_average_pool_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6421.

Python
global_average_pool_backward(gradient: Any, shape_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
shape_token: Any
workers: int | None

Source docstring:

text
Expand one gradient using a single live forward-shape token.

lsdtools.neural.global_average_pool_backward_after_geometry#

Kind: function. Source: sdk/src/lsdtools/neural.py:6449.

Python
global_average_pool_backward_after_geometry(gradient: Any, shape_token: Any, geometry: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
geometry: Any
gradient: Any
shape_token: Any
workers: int | None

Source docstring:

text
Continue backward without rereading the captured shape token.

lsdtools.neural.global_average_pool_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:5045.

Python
global_average_pool_contract_types() -> tuple[type, type, type, type]

Source docstring:

text
Return exact installed GlobalAveragePool publication record types.

lsdtools.neural.global_average_pool_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5927.

Python
global_average_pool_forward(values: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Commit one shape token, then execute the literal spatial mean.

lsdtools.neural.global_average_pool_forward_after_shape#

Kind: function. Source: sdk/src/lsdtools/neural.py:6396.

Python
global_average_pool_forward_after_shape(values: Any, shape_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
shape_token: Any
values: Any
workers: int | None

Source docstring:

text
Continue after a package layer committed its pre-mean shape token.

lsdtools.neural.hard_sigmoid_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6846.

Python
hard_sigmoid_backward(gradient: Any, cached_affine: Any, alpha: Any=0.2, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
alpha: Any
backend: Backend
cached_affine: Any
device: int
gradient: Any
workers: int | None

Source docstring:

text
Use one affine token for both strict derivative cache reads.

lsdtools.neural.hard_sigmoid_backward_after_cache_reads#

Kind: function. Source: sdk/src/lsdtools/neural.py:6871.

Python
hard_sigmoid_backward_after_cache_reads(gradient: Any, first_cached_affine: Any, second_cached_affine: Any, alpha: Any=0.2, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
alpha: Any
backend: Backend
device: int
first_cached_affine: Any
gradient: Any
second_cached_affine: Any
workers: int | None

Source docstring:

text
Execute backward after the caller captured both live cache reads.

lsdtools.neural.hard_sigmoid_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6821.

Python
hard_sigmoid_forward(values: Any, alpha: Any=0.2, beta: Any=0.5, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
alpha: Any
backend: Backend
beta: Any
device: int
values: Any
workers: int | None

Source docstring:

text
Execute literal affine-cache HardSigmoid with exact parameter tokens.

lsdtools.neural.identity_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5808.

Python
identity_backward(grad: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
grad: Any
workers: int | None

Source docstring:

text
Return the exact gradient object through semantic execution elision.

lsdtools.neural.identity_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:5787.

Python
identity_forward(x: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
workers: int | None
x: Any

Source docstring:

text
Return the exact input object through semantic execution elision.

lsdtools.neural.layer_norm_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6220.

Python
layer_norm_backward(gradient: Any, state_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
state_token: Any
workers: int | None

Source docstring:

text
Capture xhat then std before controls and continue LayerNorm backward.

lsdtools.neural.layer_norm_backward_after_cache_reads#

Kind: function. Source: sdk/src/lsdtools/neural.py:6249.

Python
layer_norm_backward_after_cache_reads(gradient: Any, state_token: Any, cached_xhat: Any, cached_std: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
cached_std: Any
cached_xhat: Any
device: int
gradient: Any
state_token: Any
workers: int | None

Source docstring:

text
Continue LayerNorm backward with both already captured caches.

lsdtools.neural.layer_norm_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:5023.

Python
layer_norm_contract_types() -> tuple[type, type, type, type]

Source docstring:

text
Return the exact installed LayerNorm result/provenance record types.

Importing :mod:`lsdtools.neural` remains service-lazy. This authority loads
the service only when called, validates the numerical contract, and rejects
missing, proxied, or non-type exports before returning them.

lsdtools.neural.layer_norm_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6173.

Python
layer_norm_forward(values: Any, d_model: Any, eps: Any=1e-05, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
d_model: Any
device: int
eps: Any
values: Any
workers: int | None

Source docstring:

text
Construct exact learned state and execute one LayerNorm pass.

lsdtools.neural.layer_norm_forward_with_state#

Kind: function. Source: sdk/src/lsdtools/neural.py:6197.

Python
layer_norm_forward_with_state(values: Any, state_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
state_token: Any
values: Any
workers: int | None

Source docstring:

text
Execute forward on one caller-owned mutable LayerNorm state.

lsdtools.neural.leaky_relu_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7096.

Python
leaky_relu_backward(gradient: Any, cached_input: Any, alpha: Any=0.01, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
alpha: Any
backend: Backend
cached_input: Any
device: int
gradient: Any
workers: int | None

Source docstring:

text
Execute the scalar-factor derivative from an explicit input token.

lsdtools.neural.leaky_relu_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7073.

Python
leaky_relu_forward(values: Any, alpha: Any=0.01, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
alpha: Any
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Execute literal eager LeakyReLU with an explicit live alpha token.

lsdtools.neural.linear_regression_loss#

Kind: function. Source: sdk/src/lsdtools/neural.py:3606.

Python
linear_regression_loss() -> Any

Source docstring:

text
Return the exact installed Linear mean-squared-error loss binding.

lsdtools.neural.max_pool2_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6330.

Python
max_pool2_backward(gradient: Any, state_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
state_token: Any
workers: int | None

Source docstring:

text
Read one live MaxPool2 state and execute its literal derivative.

lsdtools.neural.max_pool2_backward_after_state_reads#

Kind: function. Source: sdk/src/lsdtools/neural.py:6353.

Python
max_pool2_backward_after_state_reads(gradient: Any, state_token: Any, *, padded_shape: Any, output_height: Any, output_width: Any, height: Any, width: Any, pad_top: Any, pad_left: Any, mask: Any, stride_height: Any, stride_width: Any, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
height: Any
mask: Any
output_height: Any
output_width: Any
pad_left: Any
pad_top: Any
padded_shape: Any
state_token: Any
stride_height: Any
stride_width: Any
width: Any
workers: int | None

Source docstring:

text
Continue after exact package-owned cache, shape, and stride reads.

lsdtools.neural.max_pool2_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6278.

Python
max_pool2_forward(values: Any, kernel: Any=2, stride: Any=None, pad: Any=(0, 0, 0, 0), ceil_mode: Any=False, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
ceil_mode: Any
device: int
kernel: Any
pad: Any
stride: Any
values: Any
workers: int | None

Source docstring:

text
Construct exact legacy state and execute one MaxPool2 pass.

lsdtools.neural.max_pool2_forward_with_state#

Kind: function. Source: sdk/src/lsdtools/neural.py:6307.

Python
max_pool2_forward_with_state(values: Any, state_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
state_token: Any
values: Any
workers: int | None

Source docstring:

text
Execute forward on one caller-owned mutable MaxPool2 state.

lsdtools.neural.mul_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7144.

Python
mul_backward(gradient: Any, left: Any, right: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
left: Any
right: Any
workers: int | None

Source docstring:

text
Execute Mul v1 backward without reducing broadcast dimensions.

lsdtools.neural.mul_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7121.

Python
mul_forward(left: Any, right: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
left: Any
right: Any
workers: int | None

Source docstring:

text
Execute Mul v1 forward with authenticated runtime provenance.

lsdtools.neural.multiclass_classification_loss#

Kind: function. Source: sdk/src/lsdtools/neural.py:3627.

Python
multiclass_classification_loss() -> Any

Source docstring:

text
Return the exact indexed multiclass softmax-CE loss binding.

lsdtools.neural.pad_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6524.

Python
pad_backward(gradient: Any, pads: Any=(0, 0, 0, 0), *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
pads: Any
workers: int | None

Source docstring:

text
Execute Pad constructor conversion and the backward crop view.

lsdtools.neural.pad_backward_after_geometry#

Kind: function. Source: sdk/src/lsdtools/neural.py:6547.

Python
pad_backward_after_geometry(gradient: Any, pads: tuple[int, ...], height: int, width: int, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
height: int
pads: tuple[int, ...]
width: int
workers: int | None

Source docstring:

text
Continue backward after the package read the live gradient geometry.

lsdtools.neural.pad_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6476.

Python
pad_forward(values: Any, pads: Any=(0, 0, 0, 0), *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
pads: Any
values: Any
workers: int | None

Source docstring:

text
Execute Pad constructor conversion and NCHW zero padding.

lsdtools.neural.pad_forward_after_pads#

Kind: function. Source: sdk/src/lsdtools/neural.py:6499.

Python
pad_forward_after_pads(values: Any, pads: tuple[int, ...], *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
pads: tuple[int, ...]
values: Any
workers: int | None

Source docstring:

text
Continue Pad after constructor conversion was committed.

lsdtools.neural.population_implementation_descriptor#

Kind: function. Source: sdk/src/lsdtools/neural.py:4625.

Python
population_implementation_descriptor(implementation_id: str) -> Any
Python
implementation_id: str

lsdtools.neural.population_implementation_descriptors#

Kind: function. Source: sdk/src/lsdtools/neural.py:4620.

Python
population_implementation_descriptors() -> tuple[Any, ...]

lsdtools.neural.recurrent_regression_loss#

Kind: function. Source: sdk/src/lsdtools/neural.py:4524.

Python
recurrent_regression_loss() -> Any

lsdtools.neural.relu_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6597.

Python
relu_backward(gradient: Any, mask: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
mask: Any
workers: int | None

Source docstring:

text
Execute multiplication-based ReLU backward with provenance.

lsdtools.neural.relu_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6576.

Python
relu_forward(values: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Execute multiplication-based ReLU forward with provenance.

lsdtools.neural.resident_capability_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:4471.

Python
resident_capability_contract_types() -> tuple[type, ...]

lsdtools.neural.resident_capability_descriptors#

Kind: function. Source: sdk/src/lsdtools/neural.py:4615.

Python
resident_capability_descriptors(session: Any) -> tuple[Any, ...]
Python
session: Any

lsdtools.neural.resident_model_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:3568.

Python
resident_model_contract_types() -> tuple[type, ...]

Source docstring:

text
Return the exact installed model, session, and publication types.

lsdtools.neural.resident_recurrent_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:4461.

Python
resident_recurrent_contract_types() -> tuple[type, ...]

lsdtools.neural.resident_segmenter_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:2927.

Python
resident_segmenter_contract_types() -> tuple[type, type, type, type, type, type, type, type]

Source docstring:

text
Return the exact installed resident session and publication types.

lsdtools.neural.resident_session_kind#

Kind: function. Source: sdk/src/lsdtools/neural.py:4610.

Python
resident_session_kind(session: Any) -> str
Python
session: Any

lsdtools.neural.resident_transformer_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:4465.

Python
resident_transformer_contract_types() -> tuple[type, ...]

lsdtools.neural.restore_model_session#

Kind: function. Source: sdk/src/lsdtools/neural.py:3653.

Python
restore_model_session(model: Any, payload: bytes, sha256: str, *, backend: Backend='reference', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
model: Any
payload: bytes
sha256: str
workers: int | None

Source docstring:

text
Restore a resident model from an opaque canonical snapshot.

lsdtools.neural.restore_recurrent_session#

Kind: function. Source: sdk/src/lsdtools/neural.py:4546.

Python
restore_recurrent_session(model: Any, payload: bytes, sha256: str, *, backend: Backend='reference', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
model: Any
payload: bytes
sha256: str
workers: int | None

lsdtools.neural.restore_segmenter_session#

Kind: function. Source: sdk/src/lsdtools/neural.py:2998.

Python
restore_segmenter_session(payload: bytes, sha256: str, *, backend: Backend='reference', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
payload: bytes
sha256: str
workers: int | None

Source docstring:

text
Restore an authenticated opaque snapshot through its exact type.

lsdtools.neural.restore_transformer_session#

Kind: function. Source: sdk/src/lsdtools/neural.py:4589.

Python
restore_transformer_session(model: Any, payload: bytes, sha256: str, *, backend: Backend='reference', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
model: Any
payload: bytes
sha256: str
workers: int | None

lsdtools.neural.sigmoid_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6641.

Python
sigmoid_backward(gradient: Any, cached_output: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
cached_output: Any
device: int
gradient: Any
workers: int | None

Source docstring:

text
Execute the left-associated derivative from one cached output.

lsdtools.neural.sigmoid_backward_after_cache_reads#

Kind: function. Source: sdk/src/lsdtools/neural.py:6664.

Python
sigmoid_backward_after_cache_reads(gradient: Any, first_cached_output: Any, second_cached_output: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
first_cached_output: Any
gradient: Any
second_cached_output: Any
workers: int | None

Source docstring:

text
Execute backward after the package captured both live cache reads.

lsdtools.neural.sigmoid_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6620.

Python
sigmoid_forward(values: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Execute the literal legacy sigmoid and return its cached output.

lsdtools.neural.softmax_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6798.

Python
softmax_backward(gradient: Any, cached_output: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
cached_output: Any
device: int
gradient: Any
workers: int | None

Source docstring:

text
Execute the exact one-cache-read Softmax Jacobian-vector product.

lsdtools.neural.softmax_contract_types#

Kind: function. Source: sdk/src/lsdtools/neural.py:5121.

Python
softmax_contract_types() -> tuple[type, type, type, type]

Source docstring:

text
Return the exact installed Softmax result and provenance types.

lsdtools.neural.softmax_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6777.

Python
softmax_forward(values: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Execute literal channel-axis Softmax and return its output cache.

lsdtools.neural.softplus_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6754.

Python
softplus_backward(gradient: Any, cached_input: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
cached_input: Any
device: int
gradient: Any
workers: int | None

Source docstring:

text
Execute the literal Softplus derivative from one live input token.

lsdtools.neural.softplus_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6733.

Python
softplus_forward(values: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Execute literal legacy Softplus and return its live input cache.

lsdtools.neural.sub_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7192.

Python
sub_backward(gradient: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
workers: int | None

Source docstring:

text
Return Sub v1's gradient alias and elementwise negative.

lsdtools.neural.sub_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7169.

Python
sub_forward(left: Any, right: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
left: Any
right: Any
workers: int | None

Source docstring:

text
Execute Sub v1 forward with authenticated runtime provenance.

lsdtools.neural.tanh_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6710.

Python
tanh_backward(gradient: Any, cached_output: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
cached_output: Any
device: int
gradient: Any
workers: int | None

Source docstring:

text
Execute the literal single-cache-read Tanh derivative.

lsdtools.neural.tanh_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:6689.

Python
tanh_forward(values: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Execute literal legacy Tanh and return its cached output.

lsdtools.neural.upsample2_backward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7257.

Python
upsample2_backward(gradient: Any, shape_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
gradient: Any
shape_token: Any
workers: int | None

Source docstring:

text
Reduce each reshaped 2x2 gradient block using a cached shape token.

lsdtools.neural.upsample2_forward#

Kind: function. Source: sdk/src/lsdtools/neural.py:7213.

Python
upsample2_forward(values: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
values: Any
workers: int | None

Source docstring:

text
Cache one shape token and execute literal nearest-neighbor 2x repeat.

lsdtools.neural.upsample2_forward_after_shape#

Kind: function. Source: sdk/src/lsdtools/neural.py:7234.

Python
upsample2_forward_after_shape(values: Any, shape_token: Any, *, backend: Backend='auto', device: int=0, workers: int | None=None) -> Any
Python
backend: Backend
device: int
shape_token: Any
values: Any
workers: int | None

Source docstring:

text
Continue Upsample2 after the caller committed its shape token.
By LSD Team · Last updated Sep 09, 2026 Ask a question View as Markdown
Type to search every doc, guide, and tutorial.
↑↓ navigate openesc close