def resize_volumes(X, depth_factor, height_factor, width_factor, dim_ordering):
 if (dim_ordering == 'th'):
  output = repeat_elements(X, depth_factor, axis=2)
  output = repeat_elements(output, height_factor, axis=3)
  output = repeat_elements(output, width_factor, axis=4)
  return output
 elif (dim_ordering == 'tf'):
  output = repeat_elements(X, depth_factor, axis=1)
  output = repeat_elements(output, height_factor, axis=2)
  output = repeat_elements(output, width_factor, axis=3)
  return output
 else:
  raise ValueError('Invalid dim_ordering:', dim_ordering)

def resize_volumes ( X , depth_factor , height_factor , width_factor , dim_ordering ) : if ( dim_ordering == 'th' ) : output = repeat_elements ( X , depth_factor , axis = 2 ) output = repeat_elements ( output , height_factor , axis = 3 ) output = repeat_elements ( output , width_factor , axis = 4 ) return output elif ( dim_ordering == 'tf' ) : output = repeat_elements ( X , depth_factor , axis = 1 ) output = repeat_elements ( output , height_factor , axis = 2 ) output = repeat_elements ( output , width_factor , axis = 3 ) return output else : raise ValueError ( 'Invalid dim_ordering:' , dim_ordering )
resizes the volume contained in a 5d tensor of shape - [batch .