Frank
December 6, 2021, 5:40am
21
@johndoe This is mainly related to training, there is no good way to know in advance which model has the highest accuracy
johndoe
December 6, 2021, 5:42am
22
Got it.
Can you please share with me the source of pytorch’s resnet18.pt file?
Frank
December 6, 2021, 5:57am
23
@johndoe You can follow all the model in my github which used for KSNN.
PK©}&Sresnet18/versionFBZZZZZZZZZZZZZZ1
PKSüQgPK©}&S7resnet18/code/resnet18.pyFB3ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZop_version_set = 1
def forward(self,
input: Tensor) -> Tensor:
weight = self.conv1.weight
_0 = self.bn1
weight0 = _0.weight
bias = _0.bias
running_mean = _0.running_mean
running_var = _0.running_var
_1 = self.layer1
_2 = getattr(_1, "0")
weight1 = _2.conv1.weight
_3 = _2.bn1
weight2 = _3.weight
bias0 = _3.bias
running_mean0 = _3.running_mean
running_var0 = _3.running_var
weight3 = _2.conv2.weight
_4 = _2.bn2
This file has been truncated. show original
johndoe
December 6, 2021, 7:09am
24
@Frank I meant to ask for the source of this file. Was this obtained after you trained on your own? Or did you get it from the vision/some other repository>
Frank
December 6, 2021, 7:12am
25
@johndoe This is the model I trained before. The official pytorch model can be used. I trained on this basis.
johndoe
December 6, 2021, 7:46am
26
@Frank
The official pytorch model is a .pth file and the conversion script fails while dealing with it
Frank
December 6, 2021, 9:16am
27
@johndoe You can open it and save it as a pt file. The official pytorch document has this description
johndoe
December 6, 2021, 9:45am
28
@Frank Got it
Any progress on the tf_slim resnet model ?
Frank
December 6, 2021, 10:13am
29
@johndoe My plan is very full, I will try to find time to test, but there is no way yet
johndoe
December 10, 2021, 11:51am
31
Hi @Frank Any development on this?
Also, for issue how did you finalise the 4th parameter (scale)? The BGR mean values are given but the scale parameter isn’t
johndoe
December 15, 2021, 3:32am
32
This issue got resolved when I changed the source platform from ‘PYTORCH’ to ‘TENSORFLOW’ in the inference code (resnet18.py). Thanks @Frank for the help
Im new to Neural networks
How to get this mean values for pretrained models…?? is it different for different framework and different models
–mean-values ‘124,127,104,60’