Comments (5)
I'm having the same issue. Any luck fixing this?
Edit: I managed to solve this. A blank line in my file was the cause of this.
from skip-thoughts.
I'm having same issue can you help me with how to fix that?
ng f_log_probs... Done
Building f_cost... Done
Done
Building f_grad... Building optimizers... Optimization
Epoch 0
ValueError Traceback (most recent call last)
in ()
1 import train
----> 2 train.trainer (X)
/home/pratyusha/Documents/skip-thoughts/training/train.py 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_)
155 x, x_mask, y, y_mask, z, z_mask = homogeneous_data.prepare_data(x, y, z, worddict, maxlen=maxlen_w, n_words=n_words)
156
--> 157 if x == None:
158 print 'Minibatch with zero sample under length ', maxlen_w
159 uidx -= 1
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
could any one help me?
Thank you
from skip-thoughts.
@Pratyusha1796
Change x == None
in training/train.py
to
x.any() == None
or x.all() == None
.
from skip-thoughts.
I'm having the same issue. Any luck fixing this?
Edit: I managed to solve this. A blank line in my file was the cause of this.
Hi @TitusTom : Can you please help me with which file did you fix to fix this issue?
from skip-thoughts.
I am getting following error , can anyone please help ,
vectors = encoder.encode(['love is good'])
TypeError Traceback (most recent call last)
in ()
----> 1 vectors = encoder.encode(['love is good'])
~/Downloads/skip-thoughts-master/skipthoughts.py in encode(self, X, use_norm, verbose, batch_size, use_eos)
123 Encode sentences in the list X. Each entry will return a vector
124 """
--> 125 return encode(self._model, X, use_norm, verbose, batch_size, use_eos)
126
127
~/Downloads/skip-thoughts-master/skipthoughts.py in encode(model, X, use_norm, verbose, batch_size, use_eos)
151 print(k)
152 numbatches = len(ds[k]) / batch_size + 1
--> 153 for minibatch in range(numbatches):
154 caps = ds[k][minibatch::numbatches]
155
TypeError: 'float' object cannot be interpreted as an integer
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.