fpingham / spanishulmfit Goto Github PK
View Code? Open in Web Editor NEWImplementation of ULMFiT for Spanish Language using Tweets
License: MIT License
Implementation of ULMFiT for Spanish Language using Tweets
License: MIT License
Hi!
Thanks for your effort, seems very promising.
However, I got stuck with getting the backbone model in "Load Encoder Weights for Language Model" section. How could I get this backbone model?
in addition, a couple suggestions for reproducibility of notebook:
The spacy model for Spanish needs to be downloaded:
!python -m spacy download es
And a link to the dataset would be cool:
http://www.sepln.org/workshops/tass/tass_data/download.php?auth=ntcabsQs44XedvseKre
I'm trying to replicate in Google Colab your work, right now available here:
https://github.com/danielcanueto/misc/blob/master/Spanish_GeneralTASSv2.ipynb
When this Colab is finished; i'll let you know and cite you as the responsible of this work.
Thanks!
Daniel
Hello,
Could you please provide the TASS dataset? I have submitted the form in the link provided in the repo but there is no response.
Thanks,
Satyaki
Hi, I'm trying to use your model, thanks for getting it available. I'm facing this issue: torch is finding a .pth
file for de model, not a .h5
. I'm new with torch but I think it's due to versions issue. I tried to convert the .h5 file to .pth with:
def convert(path_to_old_model, path_to_save_converted_model):
"""
path_to_old_model is the path to old model
and
path_to_save_converted_model is the path where the converted model is stored
"""
old_wgts = torch.load(path_to_old_model, map_location=lambda storage, loc: storage)
new_wgts = OrderedDict()
new_wgts['0.encoder.weight']=old_wgts['0.encoder.weight']
new_wgts['encoder_dp.emb.weight']=old_wgts['0.encoder_with_dropout.embed.weight']
new_wgts['rnns.0.weight_hh_l0_raw']=old_wgts['0.rnns.0.module.weight_hh_l0_raw']
new_wgts['rnns.0.module.weight_ih_l0']=old_wgts['0.rnns.0.module.weight_ih_l0']
new_wgts['rnns.0.module.weight_hh_l0']=old_wgts['0.rnns.0.module.weight_hh_l0_raw']
new_wgts['rnns.0.module.bias_ih_l0']=old_wgts['0.rnns.0.module.bias_ih_l0']
new_wgts['rnns.0.module.bias_hh_l0']=old_wgts['0.rnns.0.module.bias_hh_l0']
new_wgts['rnns.1.weight_hh_l0_raw']=old_wgts['0.rnns.1.module.weight_hh_l0_raw']
new_wgts['rnns.1.module.weight_ih_l0']=old_wgts['0.rnns.1.module.weight_ih_l0']
new_wgts['rnns.1.module.weight_hh_l0']=old_wgts['0.rnns.1.module.weight_hh_l0_raw']
new_wgts['rnns.1.module.bias_ih_l0']=old_wgts['0.rnns.1.module.bias_ih_l0']
new_wgts['rnns.1.module.bias_hh_l0']=old_wgts['0.rnns.1.module.bias_hh_l0']
new_wgts['rnns.2.weight_hh_l0_raw']=old_wgts['0.rnns.2.module.weight_hh_l0_raw']
new_wgts['rnns.2.module.weight_ih_l0']=old_wgts['0.rnns.2.module.weight_ih_l0']
new_wgts['rnns.2.module.weight_hh_l0']=old_wgts['0.rnns.2.module.weight_hh_l0_raw']
new_wgts['rnns.2.module.bias_ih_l0']=old_wgts['0.rnns.2.module.bias_ih_l0']
new_wgts['rnns.2.module.bias_hh_l0']=old_wgts['0.rnns.2.module.bias_hh_l0']
torch.save(new_wgts, path_to_save_converted_model+'converted_model.pth')
but then i'm getting the error KeyError: '1.decoder.bias'
. Could you help me with this please?
thanks!
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.