想看一看算法中某一步的输出结果coefs,Tensor不能直接print,先采用的下图这种
后来报了个错
然后改成下图又出现了错误
这里feed给占位符的数据应该用什么呢,看第一个报错说的要用dtype float and shape [1,2708,1433],这种类型的数据怎么弄呢
谁能解决私我一下发代码看看吧/(ㄒoㄒ)/~~
想看一看算法中某一步的输出结果coefs,Tensor不能直接print,先采用的下图这种
后来报了个错
然后改成下图又出现了错误
这里feed给占位符的数据应该用什么呢,看第一个报错说的要用dtype float and shape [1,2708,1433],这种类型的数据怎么弄呢
谁能解决私我一下发代码看看吧/(ㄒoㄒ)/~~
伪代码如下:将shape为[shape_dim1,shape_dim2,shape_dim3,shape_dim4]的输入数据input_data传到模型input_name处,然后运行run,打印out_name处的输出:
input_name=graph.get_tensor_by_name('input:xxx')
out_name=graph.get_tensor_by_name('output:xxx')
feed_dict={input_name:np.reshape(input_data,[shape_dim1,shape_dim2,shape_dim3,shape_dim4])}
output=sess.run(out_name,feed_dict)
print(output)