Skip to content

reshape after view is wrong #76

Open
@ShuangLiu1992

Description

@ShuangLiu1992

Describe the bug
Linear followed by a view leads to incorrect result, tensorflowjs complains shape mismatch [NULL, output_size]. changing
reshape = keras.layers.Reshape([-1], name=tf_name) to match the input shape seems to fix the problem

To Reproduce
Snippet of your code

x = x.view(self.batch_size, -1)
self.output = nn.Linear(x.shape[1], output_size)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions