InsightFace_TF icon indicating copy to clipboard operation
InsightFace_TF copied to clipboard

the tensorlayer's Droupout layer has trouble working with tf.placeholder?

Open tenggyut opened this issue 7 years ago • 7 comments

line 138 in L_Resnet_E_IR_MGPU.py: net = tl.layers.DropoutLayer(net, keep=keep_rate, name='E_Dropout') will throw some errors related with placeholders..

tenggyut avatar May 11 '18 05:05 tenggyut

@tenggyut use pip3 install tensorlayer==1.7 may solve

ruobop avatar May 15 '18 08:05 ruobop

Have tried that already...no luck. I ended up using tf.dropout instead of tl.layers.DropoutLayer...

tenggyut avatar May 15 '18 09:05 tenggyut

Have tried that already...no luck. I ended up using tf.dropout instead of tl.layers.DropoutLayer...

I tried doing the same, but ended up with a lot of other errors. Can you tell me precisely the changes you made ?

franticguy avatar Nov 20 '18 14:11 franticguy

Have tried that already...no luck. I ended up using tf.dropout instead of tl.layers.DropoutLayer...

I tried doing the same, but ended up with a lot of other errors. Can you tell me precisely the changes you made ?

        # net = tl.layers.DropoutLayer(net, keep=0.4, name='E_Dropout')
        net.outputs = tf.nn.dropout(net.outputs, keep_prob=keep_rate, name='E_Dropout')
        net_shape = net.outputs.get_shape()

something like this

tenggyut avatar Nov 21 '18 03:11 tenggyut

That worked. Thanks!

franticguy avatar Nov 21 '18 15:11 franticguy

@tenggyut I use tf.dropout instead of tl.layers.DropoutLayer as

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

but get an error ValueError: None values not supported. how can i solve it.

zhanglaplace avatar Jan 07 '19 08:01 zhanglaplace

@tenggyut I use tf.dropout instead of tl.layers.DropoutLayer as

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

but get an error ValueError: None values not supported. how can i solve it.

Sadly, the error info you provide is not enough for me to identify the root cause...a stack trace would be helpful

A wild guess would be that None is accidentally assigned to keep_rate?

tenggyut avatar Jan 07 '19 09:01 tenggyut