Closed putaoZt closed 5 years ago
只稍改动了13,14行
上面的问题是因为我没有传model和需要改风格的图片导致的,现在的问题。。。完全没有头绪,python是只会一点点,前端学的玩的,大佬有空指导下蛤
2018-12-07 18:22:02.176192: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 INFO:tensorflow:Image size: 268x268 INFO:tensorflow:Restoring parameters from C:\Users\12994\Desktop\fast-neural-style-tensorflow-master\mymode 2018-12-07 18:22:02.510663: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open C:\Users\12994\Desktop\fast-neural-style-tensorflow-master\mymode: Unknown: NewRandomAccessFile failed to Create/Open: C:\Users\12994\Desktop\fast-neural-style-tensorflow-master\mymode : �ܾ����ʡ� ; Input/output error 2018-12-07 18:22:02.514915: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open C:\Users\12994\Desktop\fast-neural-style-tensorflow-master\mymode: Unknown: NewRandomAccessFile failed to Create/Open: C:\Users\12994\Desktop\fast-neural-style-tensorflow-master\mymode : �ܾ����ʡ� ; Input/output error 2018-12-07 18:22:02.515254: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at save_restore_tensor.cc:175 : Data loss: Unable to open table file C:\Users\12994\Desktop\fast-neural-style-tensorflow-master\mymode: Unknown: NewRandomAccessFile failed to Create/Open: C:\Users\12994\Desktop\fast-neural-style-tensorflow-master\mymode : �ܾ����ʡ� ; Input/output error
Process finished with exit code -1073741819 (0xC0000005)
2018-12-07 17:34:37.231687: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 INFO:tensorflow:Image size: 1162x640 Traceback (most recent call last): File "C:/Users/12994/Desktop/fast-neural-style-tensorflow-master-master/eval.py", line 78, in tf.app.run() File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "C:/Users/12994/Desktop/fast-neural-style-tensorflow-master-master/eval.py", line 48, in main generated = model.net(image, training=False) File "C:\Users\12994\Desktop\fast-neural-style-tensorflow-master-master\model.py", line 93, in net conv1 = tf.nn.relu(instance_norm(conv2d(image, 3, 32, 9, 1))) File "C:\Users\12994\Desktop\fast-neural-style-tensorflow-master-master\model.py", line 9, in conv2d x_padded = tf.pad(x, [[0, 0], [kernel / 2, kernel / 2], [kernel / 2, kernel / 2], [0, 0]], mode=mode) File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1898, in pad tensor, paddings, mode="REFLECT", name=name) File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 5337, in mirror_pad "MirrorPad", input=input, paddings=paddings, mode=mode, name=name) File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 609, in _apply_op_helper param_name=input_name) File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 60, in _SatisfiesTypeConstraint ", ".join(dtypes.as_dtype(x).name for x in allowed_list))) TypeError: Value passed to parameter 'paddings' has DataType float32 not in list of allowed values: int32, int64
老兄,这个是怎么解决的
2018-12-07 17:34:37.231687: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 INFO:tensorflow:Image size: 1162x640 Traceback (most recent call last): File "C:/Users/12994/Desktop/fast-neural-style-tensorflow-master-master/eval.py", line 78, in
tf.app.run()
File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "C:/Users/12994/Desktop/fast-neural-style-tensorflow-master-master/eval.py", line 48, in main
generated = model.net(image, training=False)
File "C:\Users\12994\Desktop\fast-neural-style-tensorflow-master-master\model.py", line 93, in net
conv1 = tf.nn.relu(instance_norm(conv2d(image, 3, 32, 9, 1)))
File "C:\Users\12994\Desktop\fast-neural-style-tensorflow-master-master\model.py", line 9, in conv2d
x_padded = tf.pad(x, [[0, 0], [kernel / 2, kernel / 2], [kernel / 2, kernel / 2], [0, 0]], mode=mode)
File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1898, in pad
tensor, paddings, mode="REFLECT", name=name)
File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 5337, in mirror_pad
"MirrorPad", input=input, paddings=paddings, mode=mode, name=name)
File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 609, in _apply_op_helper
param_name=input_name)
File "C:\Users\12994\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 60, in _SatisfiesTypeConstraint
", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: Value passed to parameter 'paddings' has DataType float32 not in list of allowed values: int32, int64