Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

AttributeError: 'tuple' object has no attribute 'layer' #12

Open
WAI-f opened this issue Oct 5, 2020 · 0 comments
Open

AttributeError: 'tuple' object has no attribute 'layer' #12

WAI-f opened this issue Oct 5, 2020 · 0 comments

Comments

@WAI-f
Copy link

WAI-f commented Oct 5, 2020

I installed keras 2.2.4 and tensorflow 1.14, if I tried like this:
input = tf.ones((1, 256, 256, 32, 3), dtype=tf.float32)
x = DepthwiseConv3D(kernel_size=(3, 3, 3), depth_multiplier=2)(input)
the result is ok.
but when I tried like:
def conv_separable(net, width, ksize=ksize, s=1, d=1):
ret = DepthwiseConv3D(kernel_size=(ksize,ksize,ksize),
strides=(s, s, s),
dilation_rate=(d, d, d),
padding='SAME',
activation='relu'
)(net)
ret = conv(ret, width, 1, 1, 1)
return ret
it will record error:
inbound_layers = nest.map_structure(lambda t: t._keras_history.layer,
AttributeError: 'tuple' object has no attribute 'layer'
I don't know why.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant