Python: TypeError: 'int' object is not callable

来源:互联网 发布:淘宝旺铺有什么好处 编辑:程序博客网 时间:2024/06/04 20:14

在Python2.7.5下跑tensorflow代码的时候,遇到错误:
TypeError: ‘int’ object is not callable
错误原因

#example1···round = tf.size  #用round代替一个函数······round = 12       #不小心复用了round变量为int······round(A)        

比较麻烦的是这个错会报在最后一行调用的时候,重复使用了同一个变量需要在前面确定 参考链接

阅读全文
0 0
原创粉丝点击