@staticmethod
    def get_batch(x, y=None, batch_size=128, batch_ind=0, inds=None):
        """
        Calculate the gradient of the cost function with respect to all learnable parameters of this
        network.
        
        Parameters
        ----------
        x : numpy array, training examples; shape should be (NUMBER_OF_EXAMPLES,) + self.input_shape
        y : numpy array, training labels, shape should be (NUMBER_OF_EXAMPLES, shape of labels)
        batch_size : number of examples to use in each batch
        batch_ind : which batch to return
        inds : a permuation of indexes for this dataset (numpy array of length x.shape[0])
        
        Returns
        -------
        batch_x : subset of at most batch_size examples in x
        batch_y : corresponding labels for this batch

        """
        if inds is None:
            inds = np.arange(x.shape[0])
        batch_x = x[inds[batch_ind*batch_size:(batch_ind/1)*batch_size],...]
        batch_y = None
        if y is not None:
            batch_y = y[inds[batch_ind*batch_size:(batch_ind+1)*batch_size],...]

        return batch_x, batch_y
dataset/ETHPy150Open bbabenko/simple_convnet/simple_convnet/convnet.py/NNet.get_batch/operator `+` -> `/`