Closed diziww closed 2 years ago
Hi! You can mimic the example model of densenet40 and resnet18 to extend to other models. The key point is to replace nn.Conv2d
and nn.Linear
with QConv2d
and QLinear
. For example, in DenseNet.py, the nn.Conv2d
and nn.Linear
layers are replaced by QConv2d
and QLinear
called by function make_layers
. You can reuse the make_layers
function for other models, or directly call QConv2d
and QLinear
as we did in ResNet.py. Hope this could help you.
Hi, I have learnt a lot from neurosim.
And I tried the examples you provide. But how to simulate other networks like vgg19, densenet121 and more. I download the models from pytorch and it's hard to make it work