Skip to content

Code example for tf.unstack in documentation not working #412

@SebastianSpeitel

Description

@SebastianSpeitel

TensorFlow.js version

0.11.1 and later

Browser version

any

Describe the problem or feature request

The code example for tf.unstack() isn't working, because the returned value is an array of tensors not an actual tensor, so it can't be printed using tf.print().

Code to reproduce the bug / link to feature request

https://js.tensorflow.org/api/0.11.1/#unstack
https://js.tensorflow.org/api/0.11.2/#unstack
https://js.tensorflow.org/api/0.11.6/#unstack

Possible solution

Either use a loop to iterate through the returned tensor array or just only print the first tensor in the array.

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