Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToolKit/sampling_grid.m 中 index = reshape(1:prod(img_size), img_size) reshape参数错误,此行代码的的目标是什么 #1

Open
jianyuan2015 opened this issue Oct 23, 2018 · 3 comments

Comments

@jianyuan2015
Copy link

No description provided.

@YuanfeiHuang
Copy link
Owner

请问具体是什么错误呢?我这边运行没有问题。你编译的时候暂停在这一步,看看img_size是否正常?
因为index = reshape(1:prod(img_size), img_size)的目的是生成image各个像素点的位置坐标,即:
若img_size = [3, 5], 则index = [1, 4, 7, 10, 13; 2, 5, 8, 11, 14; 3, 6, 9, 12, 15]的有序矩阵。

(程序中有个地方命名文件的时候需要调整一下,即Train_MMPM.m 的第42行将训练文件“training”更改为“Training”。)

@jianyuan2015
Copy link
Author

请问具体是什么错误呢?我这边运行没有问题。你编译的时候暂停在这一步,看看img_size是否正常?
因为index = reshape(1:prod(img_size), img_size)的目的是生成image各个像素点的位置坐标,即:
若img_size = [3, 5], 则index = [1, 4, 7, 10, 13; 2, 5, 8, 11, 14; 3, 6, 9, 12, 15]的有序矩阵。

(程序中有个地方命名文件的时候需要调整一下,即Train_MMPM.m 的第42行将训练文件“training”更改为“Training”。)

非常感谢,目前程序已经可以运行了。

@YuanfeiHuang
Copy link
Owner

请问具体是什么错误呢?我这边运行没有问题。你编译的时候暂停在这一步,看看img_size是否正常?
因为index = reshape(1:prod(img_size), img_size)的目的是生成image各个像素点的位置坐标,即:
若img_size = [3, 5], 则index = [1, 4, 7, 10, 13; 2, 5, 8, 11, 14; 3, 6, 9, 12, 15]的有序矩阵。
(程序中有个地方命名文件的时候需要调整一下,即Train_MMPM.m 的第42行将训练文件“training”更改为“Training”。)

非常感谢,目前程序已经可以运行了。

好的,之后有什么问题欢迎一起讨论~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants