在BNN中,往往训练阶段较为复杂,而inference phase is simple.

So how can we build a layer with complex training progress and simple inference algorithm?

n1 = nn.Linear(4,5)
n1.train()
print(n1.__dict__)
n1.eval()
print(n1.__dict__)

  

The different phase has its corresponding __dict__

版权声明:本文为LoveGood-luna原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/LoveGood-luna/p/13681972.html