Skip to content

Bug in UpSampling2dLayer,tf.shape(xxx) will get None axis #899

@One-sixth

Description

@One-sixth

New Issue Checklist

Issue Description

When I use UpSampling2dLayer, the outputs shape is [None, None, None, number]
It should use self.inputs.shape instead of tf.shape(self.inputs).

Reproducible Code

  • Which OS are you using ?
    win10
  • Please provide a reproducible code of your issue. Without any reproducible code, you will probably not receive any help.

[INSERT CODE HERE]

# ======================================================== #
###### THIS CODE IS AN EXAMPLE, REPLACE WITH YOUR OWN ######
# ======================================================== #

import tensorflow as tf
import tensorlayer as tl

a=tf.placeholder(tf.float32, [None, 4, 4, 3])
b=tl.layers.InputLayer(a)
c=tl.layers.UpSampling2dLayer(b, (2,2))
print(c.outputs.shape)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions