awarebayes/RecNN

Hi , i am getting RuntimeError: Could not infer dtype of numpy.int64 in DDPG . I am not able to fix this How to solve this ? Thanks

Closed this issue · 2 comments

1 for epoch in range(n_epochs):
----> 2 for batch in tqdm(env.train_dataloader):
3 loss = ddpg_update(batch, params, step=step)
4 plotter.log_losses(loss)
5 step += 1

~\Anaconda3\lib\site-packages\tqdm_tqdm_notebook.py in iter(self, *args, **kwargs)
221 def iter(self, *args, **kwargs):
222 try:
--> 223 for obj in super(tqdm_notebook, self).iter(*args, **kwargs):
224 # return super(tqdm...) will not catch exception
225 yield obj

~\Anaconda3\lib\site-packages\tqdm_tqdm.py in iter(self)
1003 """), fp_write=getattr(self.fp, 'write', sys.stderr.write))
1004
-> 1005 for obj in iterable:
1006 yield obj
1007 # Update and possibly print the progressbar.

~\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py in next(self)
334 self.reorder_dict[idx] = batch
335 continue
--> 336 return self._process_next_batch(batch)
337
338 next = next # Python 2 compatibility

~\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py in _process_next_batch(self, batch)
355 self._put_indices()
356 if isinstance(batch, ExceptionWrapper):
--> 357 raise batch.exc_type(batch.exc_msg)
358 return batch
359

RuntimeError: Traceback (most recent call last):
File "C:\Users\Lenovo\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "../..\recnn\data\env.py", line 246, in prepare_batch_wrapper
frame_size=self.frame_size,
File "../..\recnn\data\utils.py", line 177, in prepare_batch_static_size
users_t = torch.tensor(users_t)
RuntimeError: Could not infer dtype of numpy.int64

Will look at it, does problem persist with correct dependencies? Create a new conda env and test for it

ok i will try