ant-research / StructuredLM_RTDT

A library for building hierarchical text representation and corresponding downstream applications.
Apache License 2.0
76 stars 15 forks source link

Minor bug in R2D2Base #4

Closed LouChao98 closed 1 year ago

LouChao98 commented 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).

This bug does not causes errors because _tie_weights sets the weight of self.classifier to the correct shape.

imhuim982 commented 1 year ago

Thanks. We will fix it when we release the latest code for the self-interpretable symbolic-neural model.