View source: R/customConvolutionLayers.R
convOutputLength | R Documentation |
Utility function to calculate the output shape of a convolutional filter along a single dimension. It's based on the python keras utility located here
convOutputLength(
inputLength,
filterSize,
stride,
dilation = 1,
padding = c("same", "valid", "full", "causal")
)
inputLength |
input size along a single dimension. |
filterSize |
kernel size along a single dimension. |
stride |
stride length along a single dimension. |
dilation |
dilation rate along a single dimension. |
padding |
type of padding. Can be "same", "valid", "full", or "causal". |
https://github.com/keras-team/keras/blob/master/keras/utils/conv_utils.py#L118-L141
but I can't see to locate it's R analog so it's reproduced explicitly in ANTsRNet.
the output size along a single dimension.
Tustison NJ
library( ANTsRNet )
outputSize <- convOutputLength( 256, filterSize = 3, stride = 2, padding = "same" )
testthat::expect_identical( outputSize, 128 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.