'Adds the layers defined by model_str[index:] to the model.
Args:
prev_layer: Input tensor.
index:      Position in model_str to start parsing
Returns:
Output tensor, next model_str index.
Raises:
ValueError: If the model string is unrecognized.'

def BuildFromString(self, prev_layer, index):

    index = self._SkipWhitespace(index)
    for op in self.valid_ops:
        (output_layer, next_index) = op(prev_layer, index)
        if (output_layer is not None):
            return (output_layer, next_index)
    if (output_layer is not None):
        return (output_layer, next_index)
    raise ValueError(('Unrecognized    model    string:' + self.model_str[index:]))
