resnet_conv2d_block¶
-
tfsnippet.layers.resnet_conv2d_block(*args, **kwargs)¶ 2D convolutional ResNet block.
Parameters: - input (Tensor) – The input tensor, at least 4-d.
- out_channels (int) – The channel numbers of the output.
- kernel_size (int or tuple[int]) – Kernel size over spatial dimensions, for “conv” and “conv_1” convolutional layers.
- strides (int or tuple[int]) – Strides over spatial dimensions, for all three convolutional layers.
- shortcut_kernel_size (int or tuple[int]) – Kernel size over spatial dimensions, for the “shortcut” convolutional layer.
- channels_last (bool) – Whether or not the channel axis is the last axis in input? (i.e., the data format is “NHWC”)
- resize_at_exit (bool) – See
resnet_general_block(). - activation_fn – The activation function.
- normalizer_fn – The normalizer function.
- weight_norm – Passed to
conv2d(). - dropout_fn – The dropout function.
- kernel_initializer – Passed to
conv2d(). - kernel_regularizer – Passed to
conv2d(). - kernel_constraint – Passed to
conv2d(). - use_bias – Whether or not to use bias in
conv2d()? IfTrue, will always use bias. IfNone, will use bias only if normalizer_fn is not given. IfFalse, will never use bias. Default isNone. - bias_initializer – Passed to
conv2d(). - bias_regularizer – Passed to
conv2d(). - bias_constraint – Passed to
conv2d(). - trainable – Passed to
conv2d(). - name (str) – Default name of the variable scope. Will be uniquified. If not specified, generate one according to the class name.
- scope (str) – The name of the variable scope.
Returns: The output tensor.
Return type: tf.Tensor
See also