Closed iShahad97 closed 4 years ago
I tracked the error and seems that n_exp variable is float, so I converted it to integer, the model is compiled and start training, I'm not sure of what I've done but It is moving on! Then I got an error on load_dataset_Train_batch function:
Using Theano backend. Create Model Starting training... Traceback (most recent call last):
File "
", line 1, in runfile('/media/systemseng/WhitePassport/Real-world Anomaly Detection in Surveillance Videos/AnomalyDetectionCVPR2018-master/TrainingAnomalyDetector_public.py', wdir='/media/systemseng/WhitePassport/Real-world Anomaly Detection in Surveillance Videos/AnomalyDetectionCVPR2018-master') File "/home/systemseng/anaconda3/envs/salohaydib/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile execfile(filename, namespace)
File "/home/systemseng/anaconda3/envs/salohaydib/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "/media/systemseng/WhitePassport/Real-world Anomaly Detection in Surveillance Videos/AnomalyDetectionCVPR2018-master/TrainingAnomalyDetector_public.py", line 313, in
inputs, targets=load_dataset_Train_batch(AbnormalPath, NormalPath) # Load normal and abnormal video C3D features File "/media/systemseng/WhitePassport/Real-world Anomaly Detection in Surveillance Videos/AnomalyDetectionCVPR2018-master/TrainingAnomalyDetector_public.py", line 101, in load_dataset_Train_batch Abnor_list_iter = Abnor_list_iter[Num_abnormal-n_exp:] # Indexes for randomly selected Abnormal Videos
TypeError: slice indices must be integers or None or have an index method
It seems to be same problem because of n_exp variable is float, I converted it to integer.
Hi, thanks for the nice work! I met some problem when I tried to run TrainingAnomalyDetector_public.py
Versions: keras.json:
Theano: 1.0.2 Python: 3.7.6 Ubuntu: 16.04
Problem: Keras==1.2.2:
Keras==1.1.0:
Thanks again for your real wonderful job! @WaqasSultani