greentfrapp / lucent

Lucid library adapted for PyTorch
Apache License 2.0
597 stars 89 forks source link

handle single channel images in tensor_to_img #47

Closed alik-git closed 3 months ago

alik-git commented 9 months ago

If a custom model is being used where the optimized parameter image only has one channel, then the tensor_to_img_array function in render.py crashes.

By handling that possibility, the error is fixed.

greentfrapp commented 3 months ago

SFLR and thanks for the update @alik-git ! I'm merging this to a separate branch first to make a small edit