InsightFace_TF icon indicating copy to clipboard operation
InsightFace_TF copied to clipboard

TypeError: must be real number, not Tensor

Open alanMachineLeraning opened this issue 6 years ago • 2 comments

Tensor("tower_0/resnet_v1_100/E_BN1/Identity:0", shape=(512,), dtype=float32, device=/device:GPU:0) Tensor("tower_0/resnet_v1_100/E_BN1/Identity_1:0", shape=(512,), dtype=float32, device=/device:GPU:0) Traceback (most recent call last): File "train_nets_mgpu_new.py", line 135, in net = get_resnet(images_s[i], args.net_depth, type='ir', w_init=w_init_method, trainable=True, keep_rate=dropout_rate) File "/home/zhangweiwei/InsightFace_TF-master/nets/L_Resnet_E_IR_MGPU.py", line 223, in get_resnet scope='resnet_v1_%d' % num_layers) File "/home/zhangweiwei/InsightFace_TF-master/nets/L_Resnet_E_IR_MGPU.py", line 139, in resnet net = tl.layers.DropoutLayer(net, keep=keep_rate, name='E_Dropout') File "/home/zhangweiwei/anaconda3/lib/python3.6/site-packages/tensorlayer/layers.py", line 1066, in init print(" [TL] DropoutLayer %s: keep:%f is_fix:%s" % (self.name, keep, is_fix)) TypeError: must be real number, not Tensor

alanMachineLeraning avatar Mar 23 '19 08:03 alanMachineLeraning

i meet the same problem

zfs1993 avatar May 25 '19 06:05 zfs1993

The below code on L_Resnet_E_IR_fix_issue9.py is used on L_Resnet_E_IR_MGPU.py.

net.outputs = tf.nn.dropout(net.outputs, keep_prob=keep_rate, name='E_Dropout')

I think that it is working...

jaelimlim avatar Nov 06 '19 08:11 jaelimlim