

def configure(self, in_obj):
    "\n        Must receive a list of shapes for configurations\n        Need both the layer container and roi dataset to configure shapes\n        'in_obj' will include be [image_shape, roi_shape] (e.g [(3, 600, 1000), 5])\n        "
    self.prev_layer = None
    if (not isinstance(in_obj, list)):
        assert (hasattr(in_obj, 'shape') and isinstance(in_obj.shape, list))
        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'
    in_obj_img = in_obj[0]
    self.in_shape_img = in_obj_img
    if self.layers:
        for l in self.layers:
            in_obj_img = l.configure(in_obj_img)
        self.in_shape = in_obj_img.out_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))
    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