CSAILVision / CSAILVision/NetDissect-Lite

Scipy.misc (latest version), typo and type

Open
#11 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
221
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Disclaimer: I did not go through all the code yet, plus not familiar with thread manipulation and such in python, and I did not run the code yet (some compatibility mishaps to correct with scipy.misc for imresize in the latest version of the libs and checking the code including the file manipulation still hold me from doing so).

Changed:
```
from PIL import Image
# mask = imresize(feature_map, (concept_map['sh'], concept_map['sw']), mode='F')
mask = np.array(Image.fromarray(feature_map).resize((concept_map['sh'], concept_map['sw'])))
```
(Did not run that version, so maybe it is breaking the code or buggy)

There seems to be a typo in that line:
https://github.com/CSAILVision/NetDissect-Lite/blob/2163454ebeb5b15aac64e5cbd4ed8876c5c200df/loader/data_loader.py#L593

Then, without any understanding of the underlying program but with pylint, not sure if 'cancel_join_thread' can work on a pool, 'result' would appear compatible type-wise (as in the pytorch code for worker it was applied on data_queue), but not even sure if it makes any sense (plus initially outside of the loop, so probably not meant for 'result').

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.