Ask Your Question
4

How should the last dimension of the inputs be defined in order to avoid a ValueError when using the `Dense` function in tensorflow version 2.2, when the value `None` is encountered?

asked 2023-06-15 22:09:02 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-15 22:33:02 +0000

nofretete gravatar image

The last dimension of the input should be set to a fixed size, rather than None, in order to avoid a ValueError when using the Dense function in TensorFlow 2.2. This is because None signifies undefined, variable-sized dimensions, which are not compatible with the Dense layer that expects a fixed input shape. Therefore, it is important to specify a fixed size for the last dimension of the input as per the requirements of the Dense layer.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-15 22:09:02 +0000

Seen: 9 times

Last updated: Jun 15 '23