taming-transformers icon indicating copy to clipboard operation
taming-transformers copied to clipboard

wrong syntax

Open yash-markad opened this issue 4 years ago • 2 comments
trafficstars

scripts/taming-transformers.ipynb have some code issue while runtime due to wrong syntax so i did some changes you can see here https://colab.research.google.com/drive/1m11MAdnuFv-9BW2RPKYRgtzaqOOI01tp?usp=sharing

yash-markad avatar Jul 30 '21 05:07 yash-markad

This notebook worked for me where the original did not. Thx!

IanFLee avatar Aug 05 '21 02:08 IanFLee

c_code, c_indices = model.encode_to_c(segmentation) print("c_code", c_code.shape, c_code.dtype) print("c_indices", c_indices.shape, c_indices.dtype) assert c_code.shape[2]*c_code.shape[3] == c_indices.shape[0] segmentation_rec = model.cond_stage_model.decode(c_code) show_segmentation(torch.softmax(segmentation_rec, dim=1))

*assert c_code.shape[2]c_code.shape[3] == c_indices.shape[0] is correct

in orignal file there's a index missmatch

*assert c_code.shape[2]c_code.shape[3] == c_indices.shape[1] is wrong

yash-markad avatar Aug 05 '21 13:08 yash-markad