class_docstr: 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.
  
  {BaseLayer.name}
  
  Methods
  -------
  {BaseLayer.Methods}
  
  Attributes
  ----------
  {BaseLayer.Attributes}
  
  Examples
  --------
  >>> from neupy.layers import *
  >>> network = Input((10, 10, 3)) >> Upscale((2, 2))
  (?, 10, 10, 3) -> [... 2 layers ...] -> (?, 20, 20, 3)
class_docstr_tok: ["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",".","{","BaseLayer.name","}","Methods","--","--","--","-","{","BaseLayer.Methods","}","Attributes","--","--","--","--","--","{","BaseLayer.Attributes","}","Examples","--","--","--","--",">",">",">","from","neupy.layers","import","*",">",">",">","network","=","Input","(","(","10",",","10",",","3",")",")",">",">","Upscale","(","(","2",",","2",")",")","(","?",",","10",",","10",",","3",")","-",">","[","...","2","layers","...","]","-",">","(","?",",","20",",","20",",","3",")"]
code: def fail_if_shape_invalid(self, input_shape):
      if input_shape and input_shape.ndims != 4:
          raise LayerConnectionError(
              "Upscale layer should have an input value with 4 dimensions "
              "(batch, height, width, channel), got input with {} "
              "dimensions instead. Shape: {}"
              "".format(input_shape.ndims, input_shape)
          )
  
imports: from __future__ import division
  import math
  import tensorflow
  from neupy.utils import as_tuple, tf_utils
  from neupy.core.properties import TypedListProperty, ChoiceProperty, FunctionWithOptionsProperty
  from neupy.exceptions import LayerConnectionError
  from .base import BaseLayer
  from .convolutions import Spatial2DProperty
label_desc: Use image node_id 2 for calling the Upscale obj's underlying member method code with example usage: obj.fail_if_shape_invalid(input_shape) without return types