def METHOD_NAME(self, filename):
    state_dict = self.state_dict()
    data = {}
    data["num_channels"] = self.num_channels
    data["num_blocks"] = self.num_blocks
    data["state_dict"] = state_dict
    torch.save(data, filename)