FCNNDecoder

Inheritance Diagram

Inheritance diagram of ashpy.models.convolutional.decoders.FCNNDecoder

class ashpy.models.convolutional.decoders.FCNNDecoder(layer_spec_input_res, layer_spec_target_res, kernel_size, initial_filters, filters_cap, channels, use_dropout=True, dropout_prob=0.3, non_linearity=<class 'tensorflow.python.keras.layers.advanced_activations.LeakyReLU'>)[source]

Bases: ashpy.models.convolutional.decoders.Decoder

Fully Convolutional Decoder. Expected input is a feature map.

Examples

  • Direct Usage:
    dummy_generator = FCNNDecoder(
        layer_spec_input_res=(8, 8),
        layer_spec_target_res=(64, 64),
        kernel_size=(5, 5),
        initial_filters=1024,
        filters_cap=16,
        channels=3,
    )
    
    print(dummy_generator(tf.zeros((1, 1, 1, 100))).shape)
    
    (1, 64, 64, 3)
    

Methods

__init__(layer_spec_input_res, …[, …]) Build a Fully Convolutional Decoder.

Attributes

activity_regularizer Optional regularizer function for the output of this layer.
dtype
dynamic
inbound_nodes Deprecated, do NOT use! Only for compatibility with external Keras.
input Retrieves the input tensor(s) of a layer.
input_mask Retrieves the input mask tensor(s) of a layer.
input_shape Retrieves the input shape(s) of a layer.
input_spec Gets the network’s input specs.
layers
losses Losses which are associated with this Layer.
metrics Returns the model’s metrics added using compile, add_metric APIs.
metrics_names Returns the model’s display labels for all outputs.
name Returns the name of this module as passed or determined in the ctor.
name_scope Returns a tf.name_scope instance for this class.
non_trainable_variables
non_trainable_weights
outbound_nodes Deprecated, do NOT use! Only for compatibility with external Keras.
output Retrieves the output tensor(s) of a layer.
output_mask Retrieves the output mask tensor(s) of a layer.
output_shape Retrieves the output shape(s) of a layer.
run_eagerly Settable attribute indicating whether the model should run eagerly.
sample_weights
state_updates Returns the updates from all layers that are stateful.
stateful
submodules Sequence of all sub-modules.
trainable
trainable_variables Sequence of variables owned by this module and it’s submodules.
trainable_weights
updates
variables Returns the list of all layer variables/weights.
weights Returns the list of all layer variables/weights.
__init__(layer_spec_input_res, layer_spec_target_res, kernel_size, initial_filters, filters_cap, channels, use_dropout=True, dropout_prob=0.3, non_linearity=<class 'tensorflow.python.keras.layers.advanced_activations.LeakyReLU'>)[source]

Build a Fully Convolutional Decoder.

_add_initial_block(initial_filters, input_res)[source]

Ingest the tf.keras.Model inputs and prepare them for _add_building_block().

Parameters:
  • initial_filters (int) – Numbers of filters to used as a base value.
  • input_res (tuple of (int, int)) – Shape of the _get_layer_spec() input tensors.