(inputs, output_size, bias, scope)
return batch_output
Args:
        input: shape(b_sz, ..., rep_sz)
        output_size: a scalar, python number
Args:
        input: shape(b_sz, ..., rep_sz)
        output_size: a scalar, python number
Args : input : shape ( b_sz ... rep_sz ) output_size : a scalar python number
def last_dim_linear(inputs, output_size, bias, scope):
    '''
    Args:
        input: shape(b_sz, ..., rep_sz)
        output_size: a scalar, python number
    '''
    bias_start=0.0
    input_shape = tf.shape(inputs)
    out_shape = tf.concat(axis=0, values=[input_shape[:-1], [output_size]])
    input_size = np.int(inputs.get_shape()[-1])
    unbatch_input = tf.reshape(inputs, shape=[-1, input_size])

    unbatch_output = linear(unbatch_input, output_size, bias=bias,
                                            bias_start=bias_start, scope=scope)
    batch_output = tf.reshape(unbatch_output, shape=out_shape)

    return batch_output
def last_dim_linear ( inputs , output_size , bias , scope ) : bias_start = 0.0 input_shape = tf . shape ( inputs ) out_shape = tf . concat ( axis = 0 , values = [ input_shape [ : - 1 ] , [ output_size ] ] ) input_size = np . int ( inputs . get_shape ( ) [ - 1 ] ) unbatch_input = tf . reshape ( inputs , shape = [ - 1 , input_size ] ) unbatch_output = linear ( unbatch_input , output_size , bias = bias , bias_start = bias_start , scope = scope ) batch_output = tf . reshape ( unbatch_output , shape = out_shape ) return batch_output