_loop2 = function _loop2(batchIndex) {
	        var batchOuts = tidy(function () {
	          var batchStart = batches[batchIndex][0];
	          var batchEnd = batches[batchIndex][1]; // TODO(cais): Take care of the case of the last element is a flag for
	          //   training/test.

	          var insBatch = sliceArrays(ins, batchStart, batchEnd); // Construct the feeds for execute();

	          var feeds = [];

	          if (Array.isArray(insBatch)) {
	            for (var i = 0; i < insBatch.length; ++i) {
	              feeds.push({
	                key: _this3.inputs[i],
	                value: insBatch[i]
	              });
	            }
	          } else {
	            feeds.push({
	              key: _this3.inputs[0],
	              value: insBatch
	            });
	          }

	          var feedDict = new FeedDict(feeds);
	          return execute(_this3.outputs, feedDict);
	        });
	        batchOuts.forEach(function (batchOut, i) {
	          return outsBatches[i].push(batchOut);
	        });
	      }
Helper method to loop over some data in batches.

Porting Note: Not using the functional approach in the Python equivalent
  due to the imperative backend.
Porting Note: Does not support step mode currently.

@param ins: input data
@param batchSize: integer batch size.
@param verbose: verbosity model
@returns: Predictions as `tf.Tensor` (if a single output) or an `Array` of
  `tf.Tensor` (if multipe outputs).