Bartzi / see

Code for the AAAI 2018 publication "SEE: Towards Semi-Supervised End-to-End Scene Text Recognition"
GNU General Public License v3.0
574 stars 147 forks source link

I have a problem when run fsns.py ----- have already been solved #36

Closed wangshuai9517 closed 6 years ago

wangshuai9517 commented 6 years ago

use windows 10 PS E:\比赛\百度商家招牌\datasets_fusai\see\chainer> python fsns_demo.py fsns_model/model/ model_35000.npz ./demoimg/1.jpg ../datasets/fsns/fsns_char_map.json Traceback (most recent call last): File "fsns_demo.py", line 153, in predictions, crops, grids = network(image[xp.newaxis, ...]) File "E:\比赛\百度商家招牌\datasets_fusai\see\chainer\fsns_model\model\fsns.py", line 521, in call h = self.localization_net(images) File "E:\比赛\百度商家招牌\datasets_fusai\see\chainer\fsns_model\model\fsns.py", line 206, in call lstm_prediction = F.relu(self.lstm(in_feature)) File "C:\Anaconda3\lib\site-packages\chainer\links\connection\lstm.py", line 309, in call lstm_in = self.upward(x) File "C:\Anaconda3\lib\site-packages\chainer\links\connection\linear.py", line 129, in call return linear.linear(x, self.W, self.b) File "C:\Anaconda3\lib\site-packages\chainer\functions\connection\linear.py", line 234, in linear y, = LinearFunction().apply(args) File "C:\Anaconda3\lib\site-packages\chainer\function_node.py", line 243, in apply self._check_data_type_forward(in_data) File "C:\Anaconda3\lib\site-packages\chainer\function_node.py", line 328, in _check_data_type_forward self.check_type_forward(in_type) File "C:\Anaconda3\lib\site-packages\chainer\functions\connection\linear.py", line 23, in check_type_forward x_type.shape[1] == w_type.shape[1], File "C:\Anaconda3\lib\site-packages\chainer\utils\type_check.py", line 524, in expect expr.expect() File "C:\Anaconda3\lib\site-packages\chainer\utils\type_check.py", line 482, in expect '{0} {1} {2}'.format(left, self.inv, right)) chainer.utils.type_check.InvalidType: Invalid operation is performed in: LinearFunction (Forward)

Expect: in_types[0].shape[1] == in_types[1].shape[1] Actual: 36192 != 3072

wangshuai9517 commented 6 years ago

the size of the input image is 600*150.

Bartzi commented 6 years ago

what was the problem if you already solved it?

wangshuai9517 commented 6 years ago

An error caused by the size of the input image. After looking at your previous problems, I found out why. error, Expect: in_types[0].shape[1] == in_types[1].shape[1] Actual: 36192 != 3072 After I solved this problem, I want to delete it. But I won't use the deleting function. So I added "I have solved the problem" after the title. Thank you for your reply. Work is great!