How do you use the generate_mask_tensor
function and where can I find documentation on it?
Which generate_mask_tensor
are you referring to?
I generated masks without the function. Iād still like to know how to use it though. Also when I apply my mask, I get the following error
Traceback (most recent call last):
File "main.py", line 35, in <module>
main()
File "main.py", line 32, in main
train(model, G, epochs, learning_rate)
File "/Users/justin/Documents/projects/search/train.py", line 55, in train
loss, logit = train_epoch(model, G, optimizer)
File "/Users/justin/Documents/projects/search/train.py", line 29, in train_epoch
logits = logits[train_mask]
IndexError: The shape of the mask [1100, 1] at index 1 does not match the shape of the indexed tensor [1100, 82] at index 1
I think you need to squeeze the last dimension of train_mask
with train_mask = train_mask.squeeze(-1)
.
Hi, I have replied your issue on Github: