coxlab / prednet

Code and models accompanying "Deep Predictive Coding Networks for Video Prediction and Unsupervised Learning"
https://arxiv.org/abs/1605.08104
MIT License
759 stars 259 forks source link

Error in kitti_train.py? #78

Closed s-sekiguchi closed 3 years ago

s-sekiguchi commented 4 years ago

Hi, I ran kitti_train.py just after cloning the code and downloading test data with download_data.sh, and I got the following error in data_utils.py (line 56).

batch_x[i] = self.preprocess(self.X[idx:idx+self.nt]) TypeError: only integer scalar arrays can be converted to a scalar index

This may come from the fact that data type of index_array is "tuple" but the code uses "enumerate(index_array)". When I change this into "enumerate(index_array[0])", the code seems to be running without error.

I cannot see the same or similar posting in the past, so I'm wondering if this is due to my basic environment setup problem. My environment is created with environment.yml, and I'm using tensorflow backend with GTX 1070. I would appreciate comment on this. Thanks.

nikolasmcneal commented 3 years ago

Running into the same issue -- have you found a solution?

s-sekiguchi commented 3 years ago

Hi Nikolas,

Sorry for the delayed response. So far, I've not received any responses on this issue, but I think the solution that I took, which is written in my first comment, would be working. The result I got after making this fix seems reasonable. I could also ran the fixed code on the machine equipped with GeForce RTX 2060 super.

s-sekiguchi commented 3 years ago

I've found that the latest code that supports python3 and tensorflow 1.12 does not require any fix at all when I ran it on python3 environment. This problem would happen only if the latest code is running on python2 environment. So, I think this issue could be closed. Thanks.