{ }
View source on GitHub |
Cropping layer for 3D data (e.g. spatial or spatio-temporal).
Inherits From: Layer
, Operation
tf.keras.layers.Cropping3D(
cropping=((1, 1), (1, 1), (1, 1)), data_format=None, **kwargs
)
Example:
input_shape = (2, 28, 28, 10, 3)
x = np.arange(np.prod(input_shape)).reshape(input_shape)
y = keras.layers.Cropping3D(cropping=(2, 4, 2))(x)
y.shape
(2, 24, 20, 6, 3)
Input shape | |
---|---|
5D tensor with shape:
|
Output shape | |
---|---|
5D tensor with shape:
|
Methods
from_config
@classmethod
from_config( config )
Creates a layer from its config.
This method is the reverse of get_config
,
capable of instantiating the same layer from the config
dictionary. It does not handle layer connectivity
(handled by Network), nor weights (handled by set_weights
).
Args | |
---|---|
config
|
A Python dictionary, typically the output of get_config. |
Returns | |
---|---|
A layer instance. |
symbolic_call
symbolic_call(
*args, **kwargs
)