Skip to content

[BUG Report]: Conv2DTranspose not working as expected #1012

Closed
@PhasonMatrix

Description

@PhasonMatrix

Description

I am implementing a U-Net convolutional network. I have some working Python code which I am now translating over to C#. When I try to use Tensorflow.Keras.ILayer.Conv2DTranspose() I have encountered two problems.

Problem 1: If I don't include the activation parameter, or set the activation parameter to null, I get an ArgumentNullException, with the exception message as "Value cannot be null. (Parameter 'key')". The activation parameter has a default value of null so it should be okay with this value. In my python code I do not get any error when not including a value for this parameter. Also, the error message says that the missing parameter is called 'key', which is incorrect, or maybe it's referring to some other parameter further down the call stack.

Example code:
var u6Transpose = keras.layers.Conv2DTranspose(128, kernel_size: (2, 2), strides: (2, 2), output_padding: "same");

Problem 2: After successfully constructing a Conv2DTranspose object, when calling the Apply() method, I get a NotImplementedException.

Example code:
var u6Tensor = u6Transpose.Apply(c5PostDropout);

Please let me know if this is not the correct way to use this layer. I have not found any example code online.

Reproduction Steps

No response

Known Workarounds

No response

Configuration and Other Information

.Net 6.0
Compile target: x64

NuGet packages:
TensorFlow.NET 0.100.4
TensorFlow.Keras 0.10.4
SciSharp.TensorFlow.Redist 2.11.0

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