I am facing this error with the logsoftmax function, can someone please help with what is wrong?
Hey @Yamini_Rao,
I guess the issue doesn’t lie in the LogSoftmax
layer, but the input that the layer is receiving. In other words, there might be an issue in how you have defined the other layers of the network. Try to go over your initialization of other layers once, and if you are still unable to figure out the issue, DM me your implementation of the TransformerEncoder
function, so that we can try to figure out the issue.
Cheers,
Elemento
Hey @Yamini_Rao,
If you take a look at the EncoderBlock
’s implementation, you will find that it is implemented as a function. And for obtaining an encoder block, you have to call this function with the apt parameters. However, in your implementation, you haven’t called the function, so essentially, your encoder_blocks
variable is a list that contains multiple references to the function EncoderBlock
, and not the actual encoder block that you have implemented. Let me know if this helps.
Cheers,
Elemento
Yess!! @Elemento
That solves the error. Thankyou soo much for your help!!