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

buildtrainset_cnn.m reshape #1

Open
Yang507 opened this issue Jan 19, 2017 · 5 comments
Open

buildtrainset_cnn.m reshape #1

Yang507 opened this issue Jan 19, 2017 · 5 comments

Comments

@Yang507
Copy link

Yang507 commented Jan 19, 2017

buildtrainset_cnn.m的reshape不对,是因为维数不相等,坐标的是三维,右边的只有两维。请问你这个问题解决了吗

@sunxfancy
Copy link
Owner

现在的代码应该是可以运行的,这个注释可以无视了- -

@Yang507
Copy link
Author

Yang507 commented Jan 19, 2017

恩,我是改数据了,增加了一个X,总共11类,那个地方通过不了,其他地方都改过了

@Yang507
Copy link
Author

Yang507 commented Jan 20, 2017

我的数据是18位身份证号码图像,最后面多了字母‘X’。我是在读取数据的时候就增加了下面这行代码,但是
buildtrainsetinputs(i,:)=reshape(input',input_size,1)会出现维数不等的error

if(img_name(j)~='X')
    tmp_num=str2num(img_name(j))+1;
else
    tmp_num=11;
end

@sunxfancy
Copy link
Owner

你reshape的参数即使为1,也会被识别为二维矩阵的,不要写就好了

@LuanJia
Copy link

LuanJia commented Jun 6, 2017

你好,我使用gen.py生成的验证码,也是运行到buildtrainset.m 的 第11行报错:
{
带有下标的赋值维度不匹配。
出错 buildtrainset (line 11)
inputs(i, :) = reshape(input', input_size, 1);
}

不太明白是为什么,请问是为什么呀

Repository owner deleted a comment from i-am-yuvi Feb 23, 2024
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

3 participants