'Decodes features from an input string and quantizes it.
Args:
features: raw feature values
feature_size: length of each frame feature vector
max_frames: number of frames (rows) in the output feature_matrix
max_quantized_value: the maximum of the quantized value.
min_quantized_value: the minimum of the quantized value.
Returns:
feature_matrix: matrix of all frame-features
num_frames: number of frames in the sequence'

def get_video_matrix(self, features, feature_size, max_frames, max_quantized_value, min_quantized_value):

    decoded_features = tf.reshape(tf.cast(tf.decode_raw(features, tf.uint8), tf.float32), [(-1), feature_size])
    num_frames = tf.minimum(tf.shape(decoded_features)[0], max_frames)
    feature_matrix = utils.Dequantize(decoded_features, max_quantized_value, min_quantized_value)
    feature_matrix = resize_axis(feature_matrix, 0, max_frames)
    return (feature_matrix, num_frames)
