update image_resize_short and shape doc

wangkuiyi-patch-1
qiaolongfei 7 years ago
parent d1a8498b22
commit 82a4cf1960

@ -36,10 +36,13 @@ class ShapeOpMaker : public framework::OpProtoAndCheckerMaker {
public: public:
void Make() override { void Make() override {
AddInput("Input", "(Tensor), The input tensor."); AddInput("Input", "(Tensor), The input tensor.");
AddOutput("Out", "(Tensor), The shape of input tensor."); AddOutput("Out",
"(Tensor), The shape of input tensor, the data type of the shape"
" is int64_t, will be on the same device with the input Tensor.");
AddComment(R"DOC( AddComment(R"DOC(
Shape Operator. Shape Operator
Get the shape of input tensor.
Get the shape of input tensor. Only support CPU input Tensor now.
)DOC"); )DOC");
} }
}; };

@ -4650,7 +4650,7 @@ def image_resize_short(input, out_short_len, resample='BILINEAR'):
Returns: Returns:
Variable: The output is a 4-D tensor of the shape Variable: The output is a 4-D tensor of the shape
(num_batches, channls, out_h, out_w). (num_batches, channls, out_h, out_w).
""" """
in_shape = input.shape in_shape = input.shape
if len(in_shape) != 4: if len(in_shape) != 4:

Loading…
Cancel
Save