neupy.layers.Upscale

class neupy.layers.Upscale[source]

Upscales input over two axis (height and width).

Parameters:
scale : int or tuple with two int

Scaling factor for the input value. In the tuple first parameter identifies scale of the height and the second one of the width.

name : str or None

Layer’s name. Can be used as a reference to specific layer. When value specified as None than name will be generated from the class name. Defaults to None

Examples

>>> from neupy.layers import *
>>> network = Input((10, 10, 3)) >> Upscale((2, 2))
(?, 10, 10, 3) -> [... 2 layers ...] -> (?, 20, 20, 3)
Attributes:
variables : dict

Variable names and their values. Dictionary can be empty in case if variables hasn’t been created yet.

Methods

variable(value, name, shape=None, trainable=True) Initializes variable with specified values.
get_output_shape(input_shape) Computes expected output shape from the layer based on the specified input shape.
output(*inputs, **kwargs) Propagetes input through the layer. The kwargs variable might contain additional information that propages through the network.
fail_if_shape_invalid(input_shape)[source]
get_output_shape(input_shape)[source]
options = {'name': Option(class_name='BaseLayer', value=Property(name="name")), 'scale': Option(class_name='Upscale', value=TypedListProperty(name="scale"))}[source]
output(input_value, **kwargs)[source]
scale = None[source]