pyprobound.layers.layer.EmptyLayerSpec
- class EmptyLayerSpec(out_channels, in_channels, name='')
Bases:
LayerSpecLayerSpec that does not require any configuration.
- __init__(out_channels, in_channels, name='')
Initializes the layer specification.
- Parameters:
out_channels (
int) – The number of output channels.in_channels (
int) – The number of input channels.name (
str) – A string used to describe the layer.
Methods
check_length_consistency()Checks that input lengths of Binding components are consistent.
components()Iterator of child components.
forward()Define the computation performed at every call.
freeze()Turns off gradient calculation for all parameters.
in_len(length[, mode])Calculates the receptive field.
max_embedding_size()The maximum number of bytes needed to encode a sequence.
optim_procedure([ancestry, current_order])The sequential optimization procedure for all Binding components.
out_len(length[, mode])Calculates the number of elements in the output length dimension.
reload(checkpoint)Loads the model from a checkpoint file.
reload_from_state_dict(state_dict)Loads the model from a state dict.
save(checkpoint[, flank_lengths])Saves the model to a file with "state_dict" and "metadata" fields.
unfreeze([parameter])Turns on gradient calculation for the specified parameter.
update_binding_optim(binding_optim)Updates a BindingOptim with the specification's optimization steps.
Attributes
in_channelsThe number of input channels.
out_channelsThe number of output channels.
unfreezablealias of
Literal['all']Non-Inherited Members