transformer icon indicating copy to clipboard operation
transformer copied to clipboard

error in Linear

Open baoxin1100 opened this issue 4 years ago • 3 comments

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?

baoxin1100 avatar Mar 09 '20 04:03 baoxin1100

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

loveaguai avatar Jun 01 '20 01:06 loveaguai

i've got the same error

RuYunW avatar Jun 26 '20 14:06 RuYunW

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)

Tuberose-DC avatar Aug 12 '20 03:08 Tuberose-DC