We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用embedding训练后的模型在测试的时候无法导入,报错是参数的shape不对。 报的错误是我在将一个size是num_filters的参数塞给一个size是1的变量。
不知道怎么解决。
报错核心信息如下: InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [1] rhs shape= [512] [[Node: save/Assign_8 = Assign[T=DT_FLOAT, _class=["loc:@conv-maxpool-3/b"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](conv-maxpool-3/b, save/RestoreV2_8/_69)]]
The text was updated successfully, but these errors were encountered:
找到了问题,在您代码的Config.loadConfig最后一个的self.num_filters应该是self.cnn_numLayers 这里的笔误导致了参数的加载时size对不上。
Sorry, something went wrong.
No branches or pull requests
使用embedding训练后的模型在测试的时候无法导入,报错是参数的shape不对。
报的错误是我在将一个size是num_filters的参数塞给一个size是1的变量。
不知道怎么解决。
报错核心信息如下:
InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [1] rhs shape= [512]
[[Node: save/Assign_8 = Assign[T=DT_FLOAT, _class=["loc:@conv-maxpool-3/b"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](conv-maxpool-3/b, save/RestoreV2_8/_69)]]
The text was updated successfully, but these errors were encountered: