yufengm / selfattentive Goto Github PK
View Code? Open in Web Editor NEWImplementation of A Structured Self-attentive Sentence Embedding
Implementation of A Structured Self-attentive Sentence Embedding
Training data loaded.....
Start training...
# of Epochs: 30
Traceback (most recent call last):
File "train.py", line 195, in <module>
all_losses.append( train( lr, epoch )[0] )
File "train.py", line 112, in train
hidden = repackage_hidden( hidden )
File "E:\WORK\SelfAttentive-master\Utility.py", line 25, in repackage_hidden
return tuple( repackage_hidden( v ) for v in h )
File "E:\WORK\SelfAttentive-master\Utility.py", line 25, in <genexpr>
return tuple( repackage_hidden( v ) for v in h )
File "E:\WORK\SelfAttentive-master\Utility.py", line 25, in repackage_hidden
return tuple( repackage_hidden( v ) for v in h )
File "E:\WORK\SelfAttentive-master\Utility.py", line 25, in <genexpr>
return tuple( repackage_hidden( v ) for v in h )
File "E:\WORK\SelfAttentive-master\Utility.py", line 25, in repackage_hidden
return tuple( repackage_hidden( v ) for v in h )
File "E:\WORK\SelfAttentive-master\Utility.py", line 25, in <genexpr>
return tuple( repackage_hidden( v ) for v in h )
File "E:\WORK\SelfAttentive-master\Utility.py", line 25, in repackage_hidden
return tuple( repackage_hidden( v ) for v in h )
File "E:\WORK\SelfAttentive-master\Utility.py", line 25, in <genexpr>
return tuple( repackage_hidden( v ) for v in h )
File "E:\WORK\SelfAttentive-master\Utility.py", line 25, in repackage_hidden
return tuple( repackage_hidden( v ) for v in h )
File "d:\Users\Matt\Anaconda3\lib\site-packages\torch\tensor.py", line 422, in __iter__
raise TypeError('iteration over a 0-d tensor')
TypeError: iteration over a 0-d tensor
Hi yufeng,
Could you show me where is the fc_features.pt? Thanks a lot
Best Wishes
I have successfully completed the training and also extracted the attention weights. I get the following error when I try to run the Attention Visualization notebook
16
17 vector = weights.sum( 0 )
---> 18 vector = vector / vector.sum( 1 )[ 0,0 ]
19 att, ids_to_show = vector.sort( 1, descending=True )
20
RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)
Can you let me know what is wrong here?
a slight doubt,
does P = torch.norm( AAT - I, 2 ) perform frobeinus norm ?
thanks
Hi,
Can you kindly let me know how to / (where in the code) export the sentence embeddings of the training dataset ?
Thanks!
thank you for Implementation of A Structured Self-attentive Sentence Embedding,Do you have the torch
implementation version
Hi,
Could you share the performance of this code on the tasks used in 'A Structured Self-Attentive Sentence Embedding'?
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.