예제 #1
0
    def setUp(self):
        self.model = CAEPool()
        self.optimizer = O.Adam()
        self.optimizer.setup(self.model)

        img = doll()
        x_data = np.array([im_to_blob(im_preprocess(img))])
        self.x = Variable(x_data)
예제 #2
0
    def setUp(self):
        self.model = VGG_mini_ABN()
        self.optimizer = O.Adam()
        self.optimizer.setup(self.model)

        img = doll()
        img = resize(img, (128, 128), preserve_range=True)
        x_data = np.array([im_to_blob(img)])
        y_data = np.array([0], dtype=np.int32)
        self.x = Variable(x_data)
        self.y = Variable(y_data)
예제 #3
0
    def setUp(self):
        cae_ones_h5 = os.path.join(here, 'data/cae_ones.h5')
        vgg_h5 = os.path.join(here, 'data/vgg.h5')
        self.model = CAEOnesRoiVGG(
            initial_roi=[100, 100, 300, 300],
            cae_ones_h5=cae_ones_h5, vgg_h5=vgg_h5)
        self.optimizer = O.Adam()
        self.optimizer.setup(self.model)

        img = doll()
        x_data = np.array([im_to_blob(im_preprocess(img))])
        self.x = Variable(x_data)
        t_data = np.array([0], dtype=np.int32)
        self.t = Variable(t_data)