def configure(self, in_obj):
        """
        Must receive a list of shapes for configurations
        Need both the layer container and roi dataset to configure shapes
        'in_obj' will include be [image_shape, roi_shape] (e.g [(3, 600, 1000), 5])
        """
        # configure to get the shape of feature map
        self.prev_layer = None

        if not isinstance(in_obj, list):
            assert hasattr(in_obj, 'shape') and isinstance(in_obj.shape, list)
            # make sure the in_obj has information on rois_per_img,
            # if it is a dataset
            assert hasattr(in_obj, 'rois_per_img')
            self.rois_per_img = in_obj.rois_per_img
            assert hasattr(in_obj, 'rois_per_batch')
            self.rois_per_batch = in_obj.rois_per_batch

            in_obj = in_obj.shape

        assert isinstance(
            in_obj, list), "ROI pool layer must have interpretable input shapes"

        # configure all the image network layers, so self.layers has feature map shape
        # using which to get output shape

        in_obj_img = in_obj[0]
        self.in_shape_img = in_obj_img  # the previous sequential in shape

        if self.layers:
            for l in self.layers:
                in_obj_img = l.configure(in_obj_img)
            self.in_shape = in_obj_img.out_shape  # ROI layer in shape
            (self.fm_channel, self.fm_height, self.fm_width) = self.in_shape
            self.fm_reshape_shape = (
                self.fm_channel, self.fm_height * self.fm_width, self.be.bsz)
            self.error_in_reshape = (self.fm_channel, -1)

        # make the out_shape as a tuple, as if the roi_per_image a
        # time_step dimension
        self.out_shape = (self.fm_channel * self.roi_H * self.roi_W, self.rois_per_img)
        return self
dataset/ETHPy150Open NervanaSystems/neon/neon/layers/container.py/RoiPooling.configure/original