You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug/ 问题描述 (Mandatory / 必填)
ut测试出现interpolate的scale_factor变量类型问题
TypeError: For 'interpolate', the 'scale_factor' must be float, but got 'int'
Hardware Environment(Ascend/GPU/CPU) / 硬件环境:
GPU/CPU
Software Environment / 软件环境 (Mandatory / 必填):
-- MindSpore version :
Mindspore2.2.14
-- Python version :
python3.9.19
-- OS platform and distribution (e.g., Linux Ubuntu 16.04):
window/Linuxx86_64
-- GCC/Compiler version (if compiled from source):
gcc-9
Describe the bug/ 问题描述 (Mandatory / 必填)
![image](https://private-user-images.githubusercontent.com/143932922/358458677-d0718166-f818-4dd1-bf81-b963feef1886.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMjk3MDIsIm5iZiI6MTcyNDMyOTQwMiwicGF0aCI6Ii8xNDM5MzI5MjIvMzU4NDU4Njc3LWQwNzE4MTY2LWY4MTgtNGRkMS1iZjgxLWI5NjNmZWVmMTg4Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQxMjIzMjJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jMTg2MjIyYzgwMjk0MjA0ODk1ODg2NDczNjEzMDNkYWQ1NTJjNjI3MjNkMGYyNzUzMzM5MjlhMGM4NjEwYzM5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.vzZa60wWg2xp2UnOAdTl6g1h2MMRVw9w3TVnDH3ByrQ)
ut测试出现interpolate的scale_factor变量类型问题
TypeError: For 'interpolate', the 'scale_factor' must be float, but got 'int'
Hardware Environment(
Ascend
/GPU
/CPU
) / 硬件环境:GPU/CPU
Software Environment / 软件环境 (Mandatory / 必填):
-- MindSpore version :
Mindspore2.2.14
-- Python version :
python3.9.19
-- OS platform and distribution (e.g., Linux Ubuntu 16.04):
window/Linuxx86_64
-- GCC/Compiler version (if compiled from source):
gcc-9
Excute Mode / 执行模式 (Mandatory / 必填)(
PyNative
/Graph
):To Reproduce / 重现步骤 (Mandatory / 必填)
pytest test_model_depth_anything.py
Expected behavior / 预期结果 (Mandatory / 必填)
A clear and concise description of what you expected to happen.
Screenshots/ 日志 / 截图 (Mandatory / 必填)
实例代码:
from mindnlp.core.nn import functional as F
import mindspore
tensor_variable = mindspore.tensor([[1, 2], [3, 4]], dtype=mindspore.float32)
size = None
modifier = {"scale_factor": 2} if size is None else {"size": size}
Hidden = F.interpolate(tensor_variable, **modifier, mode='bilinear', align_corners=True)
if "name" == "main":
print(type(tensor_variable))
print(Hidden)
复刻报错:
![image](https://private-user-images.githubusercontent.com/143932922/358458877-3ee3e43b-fe39-42f7-a70a-71ec6fd7e085.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMjk3MDIsIm5iZiI6MTcyNDMyOTQwMiwicGF0aCI6Ii8xNDM5MzI5MjIvMzU4NDU4ODc3LTNlZTNlNDNiLWZlMzktNDJmNy1hNzBhLTcxZWM2ZmQ3ZTA4NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQxMjIzMjJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNTBkNTgwMzlkNTUzNWY0MDQ4ODYzNWZjZTFmNTQ4NWVhNjY5NDhlYmYxMDdiZGZlYmMyNzA5ZjA3NjU0NjJlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.HDWxSdIhCyLL6dZ7BWd0dOJUd4Do_gQz6zwzkhA8Zxw)
Additional context / 备注 (Optional / 选填)
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: