华为昇思MindSpore报错:ValueError:When using JIT Fallback to handle script ‘xxx‘...
华为昇思MindSpore报错:ValueError: When using JIT Fallback to handle script 'sum(pow(img_hash - sign(img_hash), 2))', the inputs should be constant, but found variable 'img_hash' to be nonconstant.
·
错误提示:ValueError: When using JIT Fallback to handle script 'sum(pow(img_hash - sign(img_hash), 2))', the inputs should be constant, but found variable 'img_hash' to be nonconstant.
Mindspore中对Python的原生函数有独立支持,编译时会优先编译成原生函数,命名时一定要注意,例如:
sum = ops.ReduceSum() #sum()是python原生函数,换一个命名即可
sum_ = ops.ReduceSum()
昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链
更多推荐

所有评论(0)