SentEncoding icon indicating copy to clipboard operation
SentEncoding copied to clipboard

'float' object cannot be interpreted as an integer

Open n0thing23333 opened this issue 5 years ago • 0 comments

When execute the encode function, the following error occurs:


TypeError Traceback (most recent call last) in ----> 1 m.encode(['123','456'], tokenize=True)

/apps/dataiku-data/jupyter-run/dku-workdirs/MARRIOTT/SentEncoding/master.py in encode(self, task_data, tokenize, use_norm) 261 for l in ds.keys(): 262 numbatches = len(ds[l]) / self.conf['option']['encode_bs'] + 1 --> 263 for minibatch in range(numbatches): 264 caps = ds[l][minibatch::numbatches] 265

TypeError: 'float' object cannot be interpreted as an integer

Solved: Cannot encode words outside dictionary.

n0thing23333 avatar May 23 '19 16:05 n0thing23333