docstr: Return a variable with every row (rightmost index) shuffled.
  
  This uses permutation random variable internally, available via
  the ``.permutation`` attribute of the return value.
docstr_tok: ["Return","a","variable","with","every","row","(","rightmost","index",")","shuffled",".","This","uses","permutation","random","variable","internally",",","available","via","the","``",".permutation","``","attribute","of","the","return","value","."]
code: def shuffle_row_elements(self, input):
      """
      Return a variable with every row (rightmost index) shuffled.
  
      This uses permutation random variable internally, available via
      the ``.permutation`` attribute of the return value.
  
      """
      perm = self.permutation(
          size=input.shape[:-1], n=input.shape[-1], ndim=input.ndim - 1
      )
      shuffled = tensor.permute_row_elements(input, perm)
      shuffled.permutation = perm
      return shuffled
  
imports: from __future__ import absolute_import, print_function, division
  import sys
  from copy import copy
  import numpy
  from six import string_types
  from six.moves import reduce, xrange
  import theano
  from theano import tensor
  from theano.tensor import opt
  from theano import gof
  from theano.compile import optdb
label_desc: Use image node_id 9 for calling the RandomStreamsBase obj's underlying member method code with example usage: obj.shuffle_row_elements(input) and returns: shuffled