Closed mlosch closed 6 years ago
I fixed this by changing src/viewprobe.py as follows:
diff --git a/src/viewprobe.py b/src/viewprobe.py
index 0e48b05..9b84e3d 100644
--- a/src/viewprobe.py
+++ b/src/viewprobe.py
@@ -109,13 +109,14 @@ class NetworkProbe:
col*(imsize+1):col*(imsize+1)+imsize,:] = vis
imfn = 'image/%s%s-%04d.jpg' % (
expdir.fn_safe(layer), gridname, unit)
- imsave(self.ed.filename(['html', imfn]), tiled)
+ #imsave(self.ed.filename(['html', imfn]), tiled)
+ imsave(self.ed.filename(os.path.join('html', imfn)), tiled)
labels = '; '.join(['%s (%s, %f)' %
(name_pciou[c][unit], categories[c], score_pciou[c, unit])
for c in bestcat_pciou[:,unit]])
html.extend([
'<h6>%s unit %d: %s</h6>' % (layer, unit + 1, labels),
- '<img src="%s" height="%d">' % (imfn, imscale)
+ '<img src="%s" height="%d">' % (os.path.join('html', imfn), imscale)
])
html.extend([
'</div>', '</body>', '</html>', ''])
Thanks for commenting! It's not that I cannot fix it myself though. It would have been nice if it worked out of the box. I thus have opened this issue to give an incentive to fix the repository. Also I had to fix the same problem in all *.probe.py files.
Thanks for reporting the issue @mlosch. I fixed the bug based on the suggestion given by @ruthcfong !
Running the default script
script/rundissect_pytorch.sh
fails for the generating view step with the following error traceback:The directory
html-image
does not even exist in the generated file structure. What does exist is:probes/pytorch_alexnet_imagenet/html/image
. The last two directories are empty.