Ejemplo n.º 1
0
    def process_layer7(self, curr_inputs):
        curr_layer = 'layer7'
        pro_inp = np.concatenate((curr_inputs, curr_inputs), axis=1)
        pro_inp = model_utils.reshape_4d(pro_inp, shape=(64, 8, 8))
        assert np.shape(pro_inp)[1:4] == self.model_structure()[curr_layer]

        return pro_inp
Ejemplo n.º 2
0
    def process_layer4(self, curr_inputs):
        curr_layer = 'layer4'
        model_reduction = self.model_reduction_plan()
        num_split, _, _, opt = model_reduction[curr_layer][0]
        weights = self.reduction_weights[curr_layer][0]
        pro_inp = base_model.reduce_inp(weights,
                                        curr_inputs,
                                        num_split=num_split,
                                        pool_method=self.params.pooling,
                                        opt=opt)

        pro_inp = model_utils.reshape_4d(pro_inp, shape=(64, 28, 28))
        assert np.shape(pro_inp)[1:4] == self.model_structure()[curr_layer]

        return pro_inp
Ejemplo n.º 3
0
    def process_layer6(self, curr_inputs):
        curr_layer = 'layer6'
        pro_inp = model_utils.reshape_4d(curr_inputs, shape=(64, 8, 8))
        assert np.shape(pro_inp)[1:4] == self.model_structure()[curr_layer]

        return pro_inp