Skip to content

fix: can't implement len for KerasShapesWrapper & Add bias implement to Conv2DTranspose.Call() #1078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ private static Conv2DArgs InitializeUndefinedArgs(Conv2DArgs args)
public override void build(KerasShapesWrapper input_shape)
{
var single_shape = input_shape.ToSingleShape();
if (len(input_shape) != 4)
if (len(single_shape) != 4)
throw new ValueError($"Inputs should have rank 4. Received input shape: {input_shape}");

var channel_axis = _get_channel_axis();
@@ -138,7 +138,10 @@ protected override Tensors Call(Tensors inputs, Tensor state = null, bool? train
}

if (use_bias)
throw new NotImplementedException("");
tf.nn.bias_add(
outputs,
bias,
data_format: conv_utils.convert_data_format(data_format, ndim: 4));

if (activation != null)
return activation.Apply(outputs);