当我尝试使用tf.Session sess.run()时...我的内核总是无缘无故死...以下是我应用的简单示例代码...以前有人可以解决这个问题吗?我在互联网上搜索过,禁用了我所有的防火墙并更新了Spyder但它似乎根本无法工作......我的任务管理器显示我的电脑使用了3%的CPU和30%的内存......
import tensorflow as tf
input = tf.Variable(tf.random_normal([1,10,10,1]))
filter = tf.Variable(tf.random_normal([3,3,1,1]))
op = tf.nn.conv2d(input,filter,strides=[1,1,1,1],padding='VALID')
op2 = tf.nn.conv2d(input,filter,strides=[1,1,1,1],padding='SAME')
init = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init)
print('Input \n')
print('{0} \n'.format(input.eval()))
print('Filter \n')
print('{0} \n'.format(filter.eval()))
print('Result with valid position \n')
result = sess.run(op) <<<<<< **KERNEL DIED here**
print(result)
print('\n')
print('Result with same position \n')
result2 = sess.run(op2)
print(result2)