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
The model.py in the github is for RHN and LSTM-based models. I believe you don't need this model to train your Bert.
Apply Selfish-RNN to train other models is simple, you just need to create a sets of masks with the "masking" function as below:
Then, the model can be trained with regular optimizers or SNT-ASGD. Note that you need to change the optimizer.step() to mask.step() in the training function.
作者,你好。
我想使用你的模型在bert上,我看到你的代码中model文件中151行这里:
这里的 x 的输入只有 seq_len, bs,而我的bert输出是 bs * seq_len * hidden_size,这里我是需要降维么
The text was updated successfully, but these errors were encountered: