def load_model_weight_predict(self, model_name, input_shape, network_depth, test_x):
        '''
        load the saved weights to make predictions
        '''
        model = self.deviation_network(input_shape, network_depth,model_name,1)
        model.load_weights(model_name)
        scoring_network = Model(inputs=model.input, outputs=model.output)

        if self.data_format == 0:
            scores = scoring_network.predict(test_x)
        else:
            data_size = test_x.shape[0]
            scores = np.zeros([data_size, 1])
            count = 512
            i = 0
            while i < data_size:
                subset = test_x[i:count].toarray()
                scores[i:count] = scoring_network.predict(subset)
                if i % 1024 == 0:
                    print(i)
                i = count
                count += 512
                if count > data_size:
                    count = data_size
            assert count == data_size
        return scores

        load the saved weights to make predictions
        
adbench/baseline/FEAWAD/run.py