imkett / pcae Goto Github PK
View Code? Open in Web Editor NEW[KBS] PCAE: A Framework of Plug-in Conditional Auto-Encoder for Controllable Text Generation PyTorch Implementation
License: MIT License
[KBS] PCAE: A Framework of Plug-in Conditional Auto-Encoder for Controllable Text Generation PyTorch Implementation
License: MIT License
Hi, thanks for your great work, I'm interested in your work. Please make your code available as soon as possible.
hi @ImKeTT ,evaluation.py is empty,I would like to know the calculation of evaluation metrics.
Thank you for a great job.
"Stage 1 BART VAE Finetuning" doesn't work on latest commit.
RuntimeError: mat1 and mat2 shapes cannot be multiplied (16x16 and 768x768)
Undoing the commit below seems to work.
c05f708
How can I fix it?
Congratulations on your contribution to controlled text generation. The evaluation file evaluation.py is empty, could you provide it?
After Stage 1 BART VAE Finetuning, the following files were saved.
./chackpoints/yelp/BART/best_val_vae_hidden.pt
The following error occurred in Stage 2.1 PCAE Plug-in Training.
RuntimeError: Error(s) in loading state_dict for VAE: Missing key(s) in state_dict: "encoder.embed_tokens.weight", "encoder.embed_positions.weight", ...
I thought that the key name "model." was the cause, so I rewrote the code below to remove "model.".
https://github.com/ImKeTT/pcae/blob/main/train.py#L234-L238
However, I got the following error:
RuntimeError: Error(s) in loading state_dict for VAE: Missing key(s) in state_dict: "pooler.dense.weight", "pooler.dense.bias", "z_linear.weight", "linear.weight".
Please tell me how to fix it.
Thanks,
最近我在尝试进行你们的工作的复现,但是在训练过程中我发现了一个问题。在VAE_finetuning函数中,我注意到优化器的设置为:
optimizer = AdamW(model.parameters(), lr=args.lr, correct_bias=True, no_deprecation_warning=True)
这表明优化器只优化model中,也即bart模型中的参数,实际上我发现在类VAE中,存在用于生成均值与方差的线性层:
self.z_linear = nn.Linear(self.config.hidden_size, 2 * self.nz, bias=False)
根据我的分析,这部分参数并未被上述定义的优化器优化,这是正常的吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.