'Set shape based parameters of this layer given an input tuple, int
or input layer.
Arguments:
in_obj (int, tuple, Layer, Tensor or dataset): object that provides shape
information for layer
Returns:
(tuple): shape of output data'

def configure(self, in_obj):

    super(BiRNN, self).configure(in_obj)
    (self.nin, self.nsteps) = interpret_in_shape(self.in_shape)
    self.out_shape = ((2 * self.nout), self.nsteps)
    self.gate_shape = (((2 * self.nout) * self.ngates), self.nsteps)
    self.hidden_shape = ((2 * self.nout), (self.nsteps + 2))
    if ((self.split_inputs is True) and ((self.nin % 2) == 1)):
        raise ValueError('#    inputs    units    is    odd    and    split_inputs    is    True    ')
    self.o_shape = (self.nout, self.nsteps)
    self.g_shape = ((self.nout * self.ngates), self.nsteps)
    self.i_shape = (((self.nin // 2), self.nsteps) if self.split_inputs else (self.nin, self.nsteps))
    if (self.weight_shape is None):
        self.weight_shape = (self.nout, self.nin)
    return self
