theano reshape -1
来源:互联网 发布:儿歌软件哪个好 编辑:程序博客网 时间:2024/06/04 19:44
import theanoimport numpy as npones = theano.shared(np.float32([[1,2,3],[4,5,6],[7,8,9]]))print(ones.get_value())print(ones.reshape([1,-1]).eval())print(ones.reshape((1,-1)).eval())print(ones.reshape((-1,)).eval())print(ones.reshape((-1,1)).eval())# print(ones.reshape((2,-1)).eval()) # ValueError: Cannot reshape input of shape (3, 3) to shape [ 2 -1]
结果
[[ 1. 2. 3.]
[ 4. 5. 6.]
[ 7. 8. 9.]]
[[ 1. 2. 3. 4. 5. 6. 7. 8. 9.]]
[[ 1. 2. 3. 4. 5. 6. 7. 8. 9.]]
[ 1. 2. 3. 4. 5. 6. 7. 8. 9.]
[[ 1.]
[ 2.]
[ 3.]
[ 4.]
[ 5.]
[ 6.]
[ 7.]
[ 8.]
[ 9.]]
0 0
- theano reshape -1
- python reshape -1
- reshape
- reshape
- reshape
- Theano学习1
- theano学习1
- Theano(1) 安装
- theano学习指南1
- theano
- Theano
- theano
- Theano
- OpenCV中Reshape -1 或0 含义
- scikit出现Reshape your data either using X.reshape(-1, 1) if your
- reshape - Reshape array
- theano学习指南1(翻译)
- theano的一个备注1
- Leetcode 78 - Subsets(枚举)
- 抽象类可以继承实体类吗?
- play 第一次请求的源码
- Android 通过URL scheme 实现点击浏览器中的URL链接,启动特定的App,并调转页面传递参数
- C++关键字(1)
- theano reshape -1
- twbsPagination分页插件
- Ural 2072 Kirill the Gardener 3
- 整合Kafka到Spark Streaming——代码示例和挑战
- PAT A1084 broken keyboard (20)
- android studio library下引用aar失败的问题?
- 假如让我重新做一个Android App
- javascript经典例子--客户端校验
- 开发帮助工具库 可查看网络请求 收集carsh 切换服务器