jayparks / transformer

A Pytorch Implementation of "Attention is All You Need" and "Weighted Transformer Network for Machine Translation"
543 stars 122 forks source link

error in Linear #10

Open baoxin1100 opened 4 years ago

baoxin1100 commented 4 years ago

self.w_q = Linear([d_model, d_k * n_heads])

TypeError Traceback (most recent call last)

in 2 d_k = 16 3 n_heads = 6 ----> 4 w_q = Linear([d_model, d_k * n_heads]) 5 w_q TypeError: __init__() missing 1 required positional argument: 'out_features' thx for your sharing, but I raise this error, can you give me some advice?
loveaguai commented 4 years ago

i have the same question with, have you solved this question?

RuYunW commented 4 years ago

i've got the same error

Tuberose-DC commented 4 years ago

Module 'Linear' needs two parameters instead of type 'list' : w_q = Linear([d_model, d_k n_heads]) ----> w_q = Linear(d_model, d_k n_heads)