Comments (10)
Hi, I have my own bookcorpus and if I want to train the decoder, how should I do? I want to know what is C and what is X in "train.trainer(X, C, skmodel)". When I run "train.trainer(X, C, skmodel)", is X and C the same list of passages from my own bookcorpus? And I think it miss function "init_tparams" in trian.py, is right? Thanks very very much :)
from skip-thoughts.
Are you looking for a pre-trained decoder which decodes the encoded sentence (like an autoencoder?).
from skip-thoughts.
yes. Can I get that one?
from skip-thoughts.
I only have one trained on the Romance part of the BookCorpus (that we used for the "neural-storyteller" project). I don't have one on the full BookCorpus though. You could train one yourself using the decoder code available. I will probably train one myself and make it available in the future.
Depending on what you're decoding, the one included with the neural-storyteller project might be sufficient, so I would give that a try first.
from skip-thoughts.
ok, I will try. Thank you for reply:)
from skip-thoughts.
Hi. Thanks very very much for your skip-thought vector.
I tried the Step3:Launch the training with ipython and met the problems as following:
In [1]: import vocab
In [2]: X=[]
In [3]: fd = file( "8911.txt", "r" )
In [4]: for line in fd.readlines():
...: X.append(list(map(string,line.split(','))))
...:
NameError Traceback (most recent call last)
in ()
1 for line in fd.readlines():
----> 2 X.append(list(map(string,line.split(','))))
3
NameError: name 'string' is not defined
In [5]: for line in fd.readlines():
X.append(list(map(String,line.split(','))))
...:
In [6]: import train
In [7]: train.trainer(X)
{'grad_clip': 5.0, 'dim': 2400, 'optimizer': 'adam', 'dim_word': 620, 'dictionary': '/data/skip-thoughts/training/temp/book_dictionary_large.pkl', 'reload_': False, 'n_words': 20000, 'batch_size': 64, 'encoder': 'gru', 'maxlen_w': 30, 'saveto': '/data/skip-thoughts/training/temp/toy.npz', 'decoder': 'gru', 'max_epochs': 5, 'dispFreq': 1, 'decay_c': 0.0, 'saveFreq': 1000}
Loading dictionary...
Building model
/usr/lib/python2.7/site-packages/theano/scan_module/scan.py:1019: Warning: In the strict mode, all neccessary shared variables must be passed as a part of non_sequences
'must be passed as a part of non_sequences', Warning)
Building f_log_probs... Done
Building f_cost... Done
Done
Building f_grad... Building optimizers... Optimization
Epoch 0
IndexError Traceback (most recent call last)
in ()
----> 1 train.trainer(X)
/data/skip-thoughts/training/train.pyc in trainer(X, dim_word, dim, encoder, decoder, max_epochs, dispFreq, decay_c, grad_clip, n_words, maxlen_w, optimizer, batch_size, saveto, dictionary, saveFreq, reload_)
151 print 'Epoch ', eidx
152
--> 153 for x, y, z in train_iter:
154 n_samples += len(x)
155 uidx += 1
/data/skip-thoughts/training/homogeneous_data.pyc in next(self)
48 while True:
49 self.len_idx = numpy.mod(self.len_idx+1, len(self.len_unique))
---> 50 if self.len_curr_counts[self.len_unique[self.len_idx]] > 0:
51 break
52 count += 1
IndexError: index 0 is out of bounds for axis 0 with size 0
In [8]:
could you help me ?
best,
Lan
from skip-thoughts.
never mind, I already solved it.
best,
Lan
from skip-thoughts.
+1
from skip-thoughts.
@wllps1988315 I am having the same error if i give a sentence into X, if i give many sentences it is giving this error. can you give me a brief insight on how you solved that error?
Thank You
from skip-thoughts.
@oxingoxing did you find one?
from skip-thoughts.
Related Issues (20)
- is there any pretrained skip-thought vector model over here.... then kindly show the way to get it...
- Facing An Issue When Trying to run command in iPython: model = skipthoughts.load_model() HOT 3
- Erorr for bi_skip.npz and uni_skip.npz => BadZipFile: File is not a zip file
- error running vocabulary expansion script
- training question
- training issue
- Conceptual error: Independent dictionaries are used in eval_trec.py for Train and Test data
- Issue with Adam implementation
- No module named 'nbsvm' HOT 1
- Cannot download model
- Encoding error: KeyError: 'UNK'
- Theano error while training
- about some files
- Code doesn't execute
- AttributeError: 'bool' object has no attribute 'tokenize'
- 连他娘的requirements都没有,爷服了 HOT 1
- Give me requirements.txt now !
- Alternative download link HOT 4
- Can I use this for summarization using UniLM?
- IOError: [Errno 2] No such file or directory: 'skipthoughts/uni_skip.npz.pkl'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skip-thoughts.