如何修改tensorflow python代码,以便当您将其导入到您自己的python文件中时,修改会被采纳?
我正在尝试调试一个用例,而张量流给出的错误消息很神秘。因此,我想修改张量流代码库以打印一些值,以便我准确地看到出了什么问题。不幸的是,我无法简单地修改 python 文件并运行,因为更改没有被采纳。还有什么额外的步骤需要做吗?具体来说,
https://github.com/tensorflow/tensorflow/blob/98a2d7d166c6ba19539e6d1fa57c47c4170ee77b/tensorflow/python/keras/engine/data_adapter.py
我修改了第 1233 行
"Your input ran out of data; interrupting training." with "Your input ran out of data; interrupting training. TESTING!!!!"
基本上我在这里添加了一些额外的日志只是为了看看它是如何工作的。然而,当我运行导入张量流的代码时,这些更改似乎没有被采纳。我已经在这里进行了修改
/path_to_anaconda/anaconda3/envs/py39tf26cpu/lib/python3.9/site-packages/tensorflow/python/keras/engine
任何帮助将不胜感激:)
I am trying to debug a use-case and the error messages that are given by tensorflow are cryptic. Therefore I want to modify the tensorflow code base to print some values so I see exactly what is going wrong. Unfortunately I am not able to simply modify the python file and run, as the changes are not getting picked up. Is there any extra step to work on? To be concrete
https://github.com/tensorflow/tensorflow/blob/98a2d7d166c6ba19539e6d1fa57c47c4170ee77b/tensorflow/python/keras/engine/data_adapter.py
I have modified line 1233
"Your input ran out of data; interrupting training." with "Your input ran out of data; interrupting training. TESTING!!!!"
Basically I added some extra log here just to see how this works. However, the changes do not seem to be getting picked up when I run my code which imports tensorflow. I have made the modifications here
/path_to_anaconda/anaconda3/envs/py39tf26cpu/lib/python3.9/site-packages/tensorflow/python/keras/engine
Any help would be greatly appreciated :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论