- class das.spec_utils.MelSpec(*args, **kwargs)¶
- call(audio, training=True)¶
This is where the layer’s logic lives.
Note here that
tf.kerasis little bit different from
kerasAPI, you can pass support masking for layers as additional arguments. Whereas
compute_mask()method to support masking.
Input tensor, or dict/list/tuple of input tensors. The first positional
inputsargument is subject to special rules: -
inputsmust be explicitly passed. A layer cannot have zero
inputscannot be provided via the default value of a keyword argument.
NumPy array or Python scalar values in
inputsget cast as tensors.
Keras mask metadata is only collected from
Layers are built (
build(input_shape)method) using shape info from
input_speccompatibility is only checked against
Mixed precision input casting is only applied to
inputs. If a layer has tensor arguments in
**kwargs, their casting behavior in mixed precision should be handled manually.
The SavedModel input specification is generated using
Integration with various ecosystem packages like TFMOT, TFLite, TF.js, etc is only supported for
inputsand not for tensors in positional and keyword arguments.
*args – Additional positional arguments. May contain tensors, although this is not recommended, for the reasons above.
Additional keyword arguments. May contain tensors, although this is not recommended, for the reasons above. The following optional keyword arguments are reserved: -
training: Boolean scalar tensor of Python boolean indicating
callis meant for training or inference.
mask: Boolean input mask. If the layer’s
call()method takes a
maskargument, its default value will be set to the mask generated for
inputsby the previous layer (if
inputdid come from a layer that generated a corresponding mask, i.e. if it came from a Keras layer with masking support).
A tensor or list/tuple of tensors.
Returns the config of the layer.
A layer config is a Python dictionary (serializable) containing the configuration of a layer. The same layer can be reinstantiated later (without its trained weights) from this configuration.
The config of a layer does not include connectivity information, nor the layer class name. These are handled by
Network(one layer of abstraction above).
get_config()does not guarantee to return a fresh copy of dict every time it is called. The callers should make a copy of the returned dict if they want to modify it.