Closed LouChao98 closed 1 year ago
https://github.com/ant-research/StructuredLM_RTDT/blob/58a178390143e742b174b59ee70586c66240e2cc/model/r2d2_base.py#L14-L17
The input_dim of self.classifier should be config.hidden_size(or self.input_dim) rather than config.intermediate_size(or self.hidden_dim).
input_dim
self.classifier
config.hidden_size
self.input_dim
config.intermediate_size
self.hidden_dim
This bug does not causes errors because _tie_weights sets the weight of self.classifier to the correct shape.
_tie_weights
Thanks. We will fix it when we release the latest code for the self-interpretable symbolic-neural model.
https://github.com/ant-research/StructuredLM_RTDT/blob/58a178390143e742b174b59ee70586c66240e2cc/model/r2d2_base.py#L14-L17
The
input_dim
ofself.classifier
should beconfig.hidden_size
(orself.input_dim
) rather thanconfig.intermediate_size
(orself.hidden_dim
).This bug does not causes errors because
_tie_weights
sets the weight ofself.classifier
to the correct shape.