gpt4 book ai didi

python - numpy reshape 中的 -1 是什么意思?

转载 作者:太空狗 更新时间:2023-10-29 21:13:42 25 4
gpt4 key购买 nike

<分区>

 I have a numpy array (A) of shape = (100000, 28, 28)
I reshape it using A.reshape(-1, 28x28)

这在机器学习管道中非常常见。这是如何运作的 ?我一直不明白 reshape 中“-1”的含义。

一个确切的问题是 this但没有确切的解释。有什么答案吗?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com