View source: R/spatialTransformerNetworkUtilities.R
layer_spatial_transformer_2d | R Documentation |
Wraps a custom spatial transformer layer
layer_spatial_transformer_2d(
object,
resampledSize,
transformType = "affine",
interpolatorType = "linear",
name = NULL
)
layer_spatial_transformer_3d(
object,
resampledSize,
transformType = "affine",
interpolatorType = "linear",
name = NULL
)
object |
Object to compose layer with. This is either a keras::keras_model_sequential to add the layer to, or another Layer which this layer will call. |
resampledSize |
size of the output in voxels |
transformType |
the spatial transform |
interpolatorType |
interpolation used for the sampling |
name |
The name of the layer |
a keras layer tensor
## Not run:
model <- keras_model_sequential()
input_shape = c(20, 20, 1)
model = model %>%
layer_conv_2d(filters = 32, kernel_size = c(3,3), activation = 'relu',
input_shape = input_shape)
model %>%
layer_spatial_transformer_2d(resampledSize = c(50, 50))
model %>%
layer_spatial_transformer_2d(resampledSize = c(50, 50, 1))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.