edit_distance 文档中给的示例跑不了,能否提供一个能用的示例?
Created by: lgone2000
def testeditdistance():
x = fluid.layers.data(name='x', shape=[8], dtype='float32')
y = fluid.layers.data(name='y', shape=[7], dtype='float32')
cost = fluid.layers.edit_distance(input=x,label=y)
报错 paddle.fluid.core.EnforceNotMet: Input(Hyps) must be a 2-D LoDTensor with the 2nd dimension equal to 1. at [/sharefolder/Paddle/paddle/fluid/operators/edit_distance_op.cc:34] PaddlePaddle Call Stacks: 0 0x7fb194c2c646p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) + 486 1 0x7fb194f94303p paddle::operators::EditDistanceOp::InferShape(paddle::framework::InferShapeContext*) const + 1011 2 0x7fb194ce0d66p paddle::framework::OpDesc::InferShape(paddle::framework::BlockDesc const&) const + 902 3 0x7fb194c8d1e5p void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, paddle::framework::OpDesc, paddle::framework::BlockDesc const&, pybind11::name, pybind11::is_method, 3 4 0x7fb194c41af4p pybind11::cpp_function::dispatcher(_object*, _object*, _object*) + 2596