[Delphi]解决Delphi Distiller运行报错"HKEY_CURRENT_USER\\" is of wrong kind or size

  最近终于决心将使用多年的Delphi 7升级到Delphi 2007,虽然目前Delphi最高版本已经是XE8,但对于只做VCL开发的话还是喜欢2007这个经典的版本。

  安装Delphi 2007一切顺利,到破解验证需要运行Delphi Distiller时,弹出以下错误:

  

  遇到错误马上问度娘,可惜度娘把家底都翻遍了,问的人多,解决的一个也没有。

  度娘蔫了只能找谷哥,谷哥果然国际范,在一个俄文的网站找到了解决方法:

    

  把HKEY_CURRENT_USER键的默认值删掉即可。

 

  转载请注明原文地址:http://www.cnblogs.com/litou/p/4515650.html

转载于:https://www.cnblogs.com/litou/p/4515650.html

以下是一个简单的利用Distiller进行知识蒸馏的Python代码示例: ```python import torch import distiller # 定义原始模型 class OriginalModel(torch.nn.Module): def __init__(self): super(OriginalModel, self).__init__() self.conv1 = torch.nn.Conv2d(3, 64, kernel_size=3, stride=1, padding=1) self.relu1 = torch.nn.ReLU(inplace=True) self.conv2 = torch.nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1) self.relu2 = torch.nn.ReLU(inplace=True) self.fc = torch.nn.Linear(64*32*32, 10) def forward(self, x): x = self.conv1(x) x = self.relu1(x) x = self.conv2(x) x = self.relu2(x) x = x.view(-1, 64*32*32) x = self.fc(x) return x # 定义蒸馏模型 class DistilledModel(torch.nn.Module): def __init__(self, teacher_model): super(DistilledModel, self).__init__() self.teacher_model = teacher_model self.conv1 = torch.nn.Conv2d(3, 32, kernel_size=3, stride=1, padding=1) self.relu1 = torch.nn.ReLU(inplace=True) self.conv2 = torch.nn.Conv2d(32, 32, kernel_size=3, stride=1, padding=1) self.relu2 = torch.nn.ReLU(inplace=True) self.fc = torch.nn.Linear(32*32*32, 10) def forward(self, x): with torch.no_grad(): teacher_output = self.teacher_model(x) x = self.conv1(x) x = self.relu1(x) x = self.conv2(x) x = self.relu2(x) x = x.view(-1, 32*32*32) x = self.fc(x) return x, teacher_output # 加载原始模型和数据 original_model = OriginalModel() original_model.eval() train_loader, val_loader = distiller.data.load_data( "cifar10", "/path/to/data", 128, 4) # 定义蒸馏器 distiller = distiller.Distiller( train_loader, val_loader, original_model, DistilledModel, "cifar10", "/path/to/checkpoints", 0.1, 0.1, 0.5, 0.5, 0.5) # 开始蒸馏 distiller.run() ``` 以上代码示例中,我们定义了一个原始模型和一个蒸馏模型,并使用Distiller进行知识蒸馏。在蒸馏模型中,我们使用了原始模型的输出作为教师模型的输出,并在训练过程中使用了蒸馏损失和原始模型的损失来进行训练。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值