怎么按照shape创建一个variable
Created by: littletomatodonkey
bbox_inside_weights是一个lodtensor,我想创建一个和它shape都相同的variable,值全为1,如下所示
shape = self.bbox_inside_weights.shape
tensor_one = fluid.layers.ones(shape=shape, dtype="float32")
提示AssertionError: The shape is invalid: (-1L, 324L).,想问一下怎么方便地实现我的这个功能呢?