smallcorgi / Faster-RCNN_TF

Faster-RCNN in Tensorflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run demo.py ERROR

HappyPK opened this issue · comments

(tf-gpu27) pk@pk-X550JK:~/faster-rcnn-tf$ python ./tools//demo.py --model /home/pk/faster-rcnn-tf/model/VGGnet_fast_rcnn_iter_70000.ckpt
2018-11-25 11:58:21.340381: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-11-25 11:58:21.585623: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:964] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-11-25 11:58:21.586014: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 0 with properties:
name: GeForce GTX 850M major: 5 minor: 0 memoryClockRate(GHz): 0.9015
pciBusID: 0000:01:00.0
totalMemory: 1.96GiB freeMemory: 1.92GiB
2018-11-25 11:58:21.586041: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1490] Adding visible gpu devices: 0
2018-11-25 11:58:22.153770: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-11-25 11:58:22.153818: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] 0
2018-11-25 11:58:22.153825: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0: N
2018-11-25 11:58:22.153979: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1103] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1679 MB memory) -> physical GPU (device: 0, name: GeForce GTX 850M, pci bus id: 0000:01:00.0, compute capability: 5.0)
Tensor("Placeholder:0", shape=(?, ?, ?, 3), dtype=float32)
Tensor("conv5_3/conv5_3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_conv/3x3/rpn_conv/3x3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_cls_score/rpn_cls_score:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_cls_prob:0", shape=(?, ?, ?, ?), dtype=float32)
Tensor("rpn_cls_prob_reshape:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_bbox_pred/rpn_bbox_pred:0", shape=(?, ?, ?, 36), dtype=float32)
Tensor("Placeholder_1:0", shape=(?, 3), dtype=float32)
Tensor("conv5_3/conv5_3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rois:0", shape=(?, 5), dtype=float32)
[<tf.Tensor 'conv5_3/conv5_3:0' shape=(?, ?, ?, 512) dtype=float32>, <tf.Tensor 'rois:0' shape=(?, 5) dtype=float32>]
Traceback (most recent call last):
File "./tools//demo.py", line 114, in
net = get_network(args.demo_net)
File "/home/pk/faster-rcnn-tf/tools/../lib/networks/factory.py", line 28, in get_network
return networks.VGGnet_test()
File "/home/pk/faster-rcnn-tf/tools/../lib/networks/VGGnet_test.py", line 16, in init
self.setup()
File "/home/pk/faster-rcnn-tf/tools/../lib/networks/VGGnet_test.py", line 57, in setup
.fc(4096, name='fc6')
File "/home/pk/faster-rcnn-tf/tools/../lib/networks/network.py", line 25, in layer_decorated
layer_output = op(self, layer_input, *args, **kwargs)
File "/home/pk/faster-rcnn-tf/tools/../lib/networks/network.py", line 246, in fc
feed_in, dim = (input, int(input_shape[-1]))
TypeError: int returned non-int (type NoneType)

GPU:GTX850M 2G
How to sovle this problem?Thanks !!!!

@HappyPK I encountered the same problem. I was able to solve it by downgrading tensorflow to 1.3 and rerunning Make. Hope that helps!

I don't know why but when I solve it by using tensorflow 1.10, tensoeflow-gpu 1.4 and rerunning Make .