Пример #1
0
    def _set_model(self):
        """
        Available model
        cifar:
            preresnet
        imagenet:
            resnet
        """

        self.original_model, self.test_input = get_model(
            self.settings.dataset, self.settings.net_type, self.settings.depth,
            self.settings.n_classes)
        self.pruned_model, self.test_input = get_model(self.settings.dataset,
                                                       self.settings.net_type,
                                                       self.settings.depth,
                                                       self.settings.n_classes)
Пример #2
0
    def _set_model(self):
        """
        Get model
        """

        self.pruned_model, self.test_input = get_model(self.settings.dataset,
                                                       self.settings.net_type,
                                                       self.settings.depth,
                                                       self.settings.n_classes)
        self.replace_layer_with_mask_conv()
Пример #3
0
Файл: main.py Проект: qdmy/DCP-1
    def _set_model(self):
        """
        Available model
        cifar:
            preresnet
        imagenet:
            resnet
        """

        self.model, _ = get_model(self.settings.dataset,
                                  self.settings.net_type, self.settings.depth,
                                  self.settings.n_classes)