一、问题现象(附报错日志上下文):
SHAP使用的是keras,我手动迁移成tensorflow.keras后,又按照教程(https://support.huaweicloud.com/tfmigr-cann502alpha5training/atlasmprtg_13_0014.html ) 添加了代码。然后执行,会出现动态shape的错误,随后我加上了
custom_op.parameter_map["dynamic_input"].b = True
custom_op.parameter_map["dynamic_graph_execute_mode"].s = tf.compat.as_bytes("lazy_recompile")
程序可以跑,但仍然没有出现The model has been compiled on the Ascend AI processor, current graph id is这样证明程序跑到NPU上的日志。
二、软件版本:
-- CANN 5.0.3
--Tensorflow 1.15
--Python 3.7
三、测试步骤:
提取码:
123456
*有效期至: 2022/12/11 18:56:07 GMT+08:00
请issue附上网络脚本、数据集等OBS全链接
均在这里面,其中VGG里面是预处理模型VGG16,shap/data是数据集。
这个是GitHub地址: https://github.com/slundberg/shap
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
本地用以上脚本复现已跑在NPU上,请检查是否打印屏幕上,未写入日志
Sign in to comment