You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
modules = {}
for n, m in model.named_modules():
for np, p in m.named_parameters(recurse=False):
if p is None:
continue
key = n + '.' + np
if key in modules:
assert id(p) == id(modules[key][0]), (n, np, p.shape, modules[key][0].shape)
continue
modules[key] = (p, m)
n_params = len(list(self.model.named_parameters())) # There is a bug that named_parameters cannot print all parameters
assert len(modules) == n_params, (len(modules), n_params)
PRINT:
134 != 133
So there is a layer of parameters is not register
IT IS heads.default.3.weight
And I found its bias can print normally.
The text was updated successfully, but these errors were encountered:
adapters-1.0.0 tokenizers-0.19.1 transformers-4.43.4
BUG:
RUN this code:
PRINT:
134 != 133
So there is a layer of parameters is not register
IT IS heads.default.3.weight
And I found its bias can print normally.
The text was updated successfully, but these errors were encountered: