提交 48399150 编写于 作者: C cuicheng01

update cswin_transformer.py

上级 51e06d43
...@@ -128,8 +128,8 @@ def windows2img(img_splits, h_split, w_split, img_h, img_w): ...@@ -128,8 +128,8 @@ def windows2img(img_splits, h_split, w_split, img_h, img_w):
Returns: Returns:
img: tensor, original tensor img: tensor, original tensor
""" """
B = paddle.to_tensor(img_splits.shape[0] / B = paddle.to_tensor(img_splits.shape[0] //
(img_h / h_split * img_w / w_split), "int32") (img_h // h_split * img_w // w_split), "int32")
img = img_splits.reshape([ img = img_splits.reshape([
B, img_h // h_split, img_w // w_split, h_split, w_split, B, img_h // h_split, img_w // w_split, h_split, w_split,
img_splits.shape[-1] img_splits.shape[-1]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册