关于解决torch优化器做正则化时会对bias进行正则化处理(转)
将参数分开使用字典传参给优化器, 这样可以将weight 和 bias 参数分隔开
import torch
import torch.nn as nn
import numpy as np
## build model
class net(nn.Module):
def __init__(self):
super().__init__()
self....
转载
2019-12-13 19:23:26 ·
560 阅读 ·
0 评论