USTC-Video-Understanding/I3D_Finetune

can we run this using python3?

DSOCT18 opened this issue · 11 comments

hey there i am facing a problem while running this code using python3?
Following is the error i am getting::

CUDA_VISIBLE_DEVICES=0 python3 finetune.py ucf101 rgb 1

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:

WARNING:tensorflow:From finetune.py:67: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, use
tf.py_function, which takes a python function which manipulates tf eager
tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
an ndarray (just call tensor.numpy()) but having access to eager tensors
means tf.py_functions can use accelerators such as GPUs as well as
being differentiable using a gradient tape.

WARNING:tensorflow:From /home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/data/ops/iterator_ops.py:358: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /home/kt-gpu2/I3D_Finetune/i3d.py:466: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:From finetune.py:164: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.dense instead.
WARNING:tensorflow:From /home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
2019-06-21 10:00:14.026572: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-06-21 10:00:14.027276: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x108608f0 executing computations on platform CUDA. Devices:
2019-06-21 10:00:14.027313: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): GeForce GTX 1060 6GB, Compute Capability 6.1
2019-06-21 10:00:14.051709: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3392080000 Hz
2019-06-21 10:00:14.052425: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x108c9540 executing computations on platform Host. Devices:
2019-06-21 10:00:14.052466: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): ,
2019-06-21 10:00:14.052661: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties:
name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.7085
pciBusID: 0000:01:00.0
totalMemory: 5.93GiB freeMemory: 5.59GiB
2019-06-21 10:00:14.052688: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-06-21 10:00:14.053806: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-06-21 10:00:14.053831: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0
2019-06-21 10:00:14.053843: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N
2019-06-21 10:00:14.053963: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5425 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
WARNING:tensorflow:From /home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
INFO:tensorflow:Restoring parameters from ./data/checkpoints/rgb_imagenet/model.ckpt
----Here we start!----
Output wirtes to output/finetune-ucf101-rgb-1
2019-06-21 10:00:38.094397: I tensorflow/stream_executor/dso_loader.cc:152] successfully opened CUDA library libcublas.so.10.0 locally
2019-06-21 10:00:38.313329: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.313554: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.313737: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.313908: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.314015: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.314833: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.315202: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.315623: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.316223: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.316574: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.316712: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.316893: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.317196: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.318366: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.319143: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.319225: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.319289: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.319359: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.319773: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.320081: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.320165: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.321204: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.321324: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.321419: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.321539: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.321618: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.322982: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.323504: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.323633: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.323859: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.323959: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.324091: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.324178: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.324518: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.326011: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.326203: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.326359: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.326454: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.326676: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.326851: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

2019-06-21 10:00:38.327013: W tensorflow/core/framework/op_kernel.cc:1389] Invalid argument: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

Traceback (most recent call last):
File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call
return fn(*args)
File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

 [[{{node PyFunc}}]]
 [[{{node IteratorGetNext}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "finetune.py", line 293, in
main(**vars(p.parse_args()))
File "finetune.py", line 232, in main
feed_dict={dropout_holder: _DROPOUT, is_train_holder: True})
File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 929, in run
run_metadata_ptr)
File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1152, in _run
feed_dict_tensor, options, run_metadata)
File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run
run_metadata)
File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):

File "/home/kt-gpu2/.local/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 207, in call
ret = func(*args)

File "finetune.py", line 75, in process_video
clip_seq, label_seq = data.next_batch(1, _CLIP_SIZE)

File "/home/kt-gpu2/I3D_Finetune/lib/action_dataset.py", line 33, in next_batch
self.videos[self.perm[i]].get_frames(frame_num, data_augment=data_augment))

File "/home/kt-gpu2/I3D_Finetune/lib/video_3d.py", line 41, in get_frames
frames.extend(self.load_img((i-1)%self.total_frame_num+1))

TypeError: 'NoneType' object is not iterable

 [[{{node PyFunc}}]]
 [[node IteratorGetNext (defined at finetune.py:140) ]]

code_zip.zip

please explain variables:
_CLIP_SIZE
_EACH_VIDEO_TEST_SIZE
_FRAME_SIZE

_CLIP_SIZE means in the #num of frames you select for each video during training;
_EACH_VIDEO_TEST_SIZE means in the #num of frames you select for each video during testing;
_FRAME_SIZE means the spatial size of input video, i.e. width or height of the input video (we set the width equal to height.)

_CLIP_SIZE means in the #num of frames you select for each video during training;
_EACH_VIDEO_TEST_SIZE means in the #num of frames you select for each video during testing;
_FRAME_SIZE means the spatial size of input video, i.e. width or height of the input video (we set the width equal to height.)

so clip size will be the same as the number of frames we have put in the rgb.txt and flow.txt list files after the path ???
also the spatial size of the input video is 320x240 so if i try to modify the _FRAME_SIZE in the code by adding or substracting some numeric value to this variable for eg.
if i set frame size to 320 and then i do this
clip_holder.set_shape(
[None, None, _FRAME_SIZE, _FRAME_SIZE-80, _CHANNEL[mode]])

will it work and if it does how many other files of code and classes/functions do i need to make this changes in?
Thanks alot.

clip size is not the same as the number of frames put in the txt document, it is the # sampling frames, for details you should refer to the paper I3D. If you change your input frame size, maybe you should change your network parameters, and you can debug to see if the network definition is able to run well.

clip size is not the same as the number of frames put in the txt document, it is the # sampling frames, for details you should refer to the paper I3D. If you change your input frame size, maybe you should change your network parameters, and you can debug to see if the network definition is able to run well.

I tried refering the paper but i wasnt able to understand the problem relating to selecting the clip size. the total number of frames in each video i have is 31. for rgb and flow data i have taken 15 frames from each videos...what do you think should i keep the clip size according to you?
thank you for the reply.

@DSOCT18 Hello, I have encountered the same problem as you, and I have not solved it. Have you solved it?

This is a question about type-bytes and type-str .
Running the code in python3, when the function get_frames() is called, type(self.mode) and type(self.path) both are bytes. so just make a change self.mode.decode("utf-8") and self.path.decode("utf-8") , then code will run well.

This is a question about type-bytes and type-str .
Running the code in python3, when the function get_frames() is called, type(self.mode) and type(self.path) both are bytes. so just make a change self.mode.decode("utf-8") and self.path.decode("utf-8") , then code will run well.

Thanks for your comment. I'd like to know, where exactly should this changes be made? in each .py files? that is, action_dataset.py, instance.py, video_3d.py?

This is a question about type-bytes and type-str .
Running the code in python3, when the function get_frames() is called, type(self.mode) and type(self.path) both are bytes. so just make a change self.mode.decode("utf-8") and self.path.decode("utf-8") , then code will run well.

Thanks for your comment. I'd like to know, where exactly should this changes be made? in each .py files? that is, action_dataset.py, instance.py, video_3d.py?

i3d
Just like this functions in this pic. I rewrite this repo, so i can't confirm which files they lied in.

Thank you so much for your help, my issue has been resolved.

This is a question about type-bytes and type-str .
Running the code in python3, when the function get_frames() is called, type(self.mode) and type(self.path) both are bytes. so just make a change self.mode.decode("utf-8") and self.path.decode("utf-8") , then code will run well.

Thanks for your comment. I'd like to know, where exactly should this changes be made? in each .py files? that is, action_dataset.py, instance.py, video_3d.py?

i3d
Just like this functions in this pic. I rewrite this repo, so i can't confirm which files they lied in.

Thank you so much for your help, my issue has been resolved.

One more question though, could you please share the scripts for generating rgb.txt and flow.txt? I am getting <FileNotFoundError: [Errno 2]>,thanks.

@sanolans just like scripts below.
test

@sanolans just like scripts below.
test

Thank you so much. Was able to generate the list accordingly, seems to be running fine now.