smallcorgi / Faster-RCNN_TF

Faster-RCNN in Tensorflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: unsupported operand type(s) for /: 'Dimension' and 'int'

henbucuoshanghai opened this issue · comments

2019-05-16 18:33:28.246320: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N
2019-05-16 18:33:28.246658: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10136 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:65:00.0, compute capability: 7.5)
Tensor("Placeholder:0", shape=(?, ?, ?, 3), dtype=float32)
Traceback (most recent call last):
File "./tools/demo.py", line 115, in
net = get_network(args.demo_net)
File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/networks/factory.py", line 28, in get_network
return networks.VGGnet_test()
File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/networks/VGGnet_test.py", line 16, in init
self.setup()
File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/networks/VGGnet_test.py", line 20, in setup
.conv(3, 3, 64, 1, 1, name='conv1_1', trainable=False)
File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/networks/network.py", line 25, in layer_decorated
layer_output = op(self, layer_input, *args, **kwargs)
File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/networks/network.py", line 105, in conv
kernel = self.make_var('weights', [int(k_h), int(k_w), int(c_i/group), int(c_o)], init_weights, trainable)
TypeError: unsupported operand type(s) for /: 'Dimension' and 'int'

py2 i change the code to py3,and demo it with this error why?