if cond(depth, kernel_size, stride):
n = (input_size - kernel_size) // stride + 1
if cond(depth, kernel_size, stride):
n = (input_size - kernel_size) // stride + 1
q = conv_chain(n, output_size, depth - 1, cond)
r += [ [ (kernel_size, stride) ] + u for u in q ]
return r
q = conv_chain(n, output_size, depth - 1, cond)
r += [ [ (kernel_size, stride) ] + u for u in q ]
return r
# Example
c = conv_chain(
input_size = 64, output_size = 8,
depth = 5,
# We want kernels smaller than 4, strides smaller than the
# Example
c = conv_chain(
input_size = 64, output_size = 8,
depth = 5,
# We want kernels smaller than 4, strides smaller than the