AutoPortraitMatting
AutoPortraitMatting copied to clipboard
请问先运行完FCN.py成功,再运行FCN_plus.py报错,怎么解决?I can run the FCN.py successfully,but I have a problem in running the FCN_plus.py.Asking for help,thanks
E:\anaconda3\python.exe "G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py" WARNING:tensorflow:From G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py:237: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
setting up vgg initialized conv layers ... WARNING:tensorflow:From G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py:88: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.
WARNING:tensorflow:From G:\Document\Graduation_ project\AutoPortraitMatting-master\AutoPortraitMatting-master\TensorflowUtils_plus.py:65: calling Constant.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From G:\Document\Graduation_ project\AutoPortraitMatting-master\AutoPortraitMatting-master\TensorflowUtils_plus.py:66: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.
WARNING:tensorflow:From G:\Document\Graduation_ project\AutoPortraitMatting-master\AutoPortraitMatting-master\TensorflowUtils_plus.py:127: The name tf.nn.avg_pool is deprecated. Please use tf.nn.avg_pool2d instead.
OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids. OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0,1,2,3,4,5,6,7} OMP: Info #156: KMP_AFFINITY: 8 available OS procs OMP: Info #157: KMP_AFFINITY: Uniform topology OMP: Info #179: KMP_AFFINITY: 1 packages x 4 cores/pkg x 2 threads/core (4 total cores) OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map: OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 0 thread 1 OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 1 thread 0 OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 1 thread 1 OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 2 thread 0 OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 2 thread 1 OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 3 thread 0 OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 3 thread 1 OMP: Info #242: KMP_AFFINITY: pid 3784 thread 0 bound to OS proc set {0} OMP: Info #242: KMP_AFFINITY: pid 3784 thread 3 bound to OS proc set {6} OMP: Info #242: KMP_AFFINITY: pid 3784 thread 1 bound to OS proc set {2} OMP: Info #242: KMP_AFFINITY: pid 3784 thread 2 bound to OS proc set {4} WARNING:tensorflow:From G:\Document\Graduation_ project\AutoPortraitMatting-master\AutoPortraitMatting-master\TensorflowUtils_plus.py:123: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
WARNING:tensorflow:From G:\Document\Graduation_ project\AutoPortraitMatting-master\AutoPortraitMatting-master\TensorflowUtils_plus.py:75: The name tf.truncated_normal is deprecated. Please use tf.random.truncated_normal instead.
WARNING:tensorflow:From G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py:100: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:From G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py:134: calling argmax (from tensorflow.python.ops.math_ops) with dimension is deprecated and will be removed in a future version.
Instructions for updating:
Use the axis argument instead
WARNING:tensorflow:From E:\anaconda3\lib\site-packages\tensorflow\python\util\dispatch.py:180: calling expand_dims (from tensorflow.python.ops.array_ops) with dim is deprecated and will be removed in a future version.
Instructions for updating:
Use the axis argument instead
WARNING:tensorflow:From G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py:244: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2021-02-25 00:05:06.079382: I tensorflow/core/platform/cpu_feature_guard.cc:145] This TensorFlow binary is optimized with Intel(R) MKL-DNN to use the following CPU instructions in performance critical operations: AVX AVX2 To enable them in non-MKL-DNN operations, rebuild TensorFlow with the appropriate compiler flags. 2021-02-25 00:05:06.081405: I tensorflow/core/common_runtime/process_util.cc:115] Creating new thread pool with default inter op setting: 8. Tune using inter_op_parallelism_threads for best performance. WARNING:tensorflow:From G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py:247: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.
WARNING:tensorflow:From E:\anaconda3\lib\site-packages\tensorflow\python\training\saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix. Traceback (most recent call last): File "E:\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1356, in _do_call return fn(*args) File "E:\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1341, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "E:\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1429, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [3,3,6,64] rhs shape= [3,3,3,64] [[{{node save/Assign_13}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "E:\anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1286, in restore {self.saver_def.filename_tensor_name: save_path}) File "E:\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 950, in run run_metadata_ptr) File "E:\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1173, in _run feed_dict_tensor, options, run_metadata) File "E:\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1350, in _do_run run_metadata) File "E:\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1370, in do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [3,3,6,64] rhs shape= [3,3,3,64] [[node save/Assign_13 (defined at G:/Document/Graduation project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py:247) ]]
Errors may have originated from an input operation. Input Source operations connected to node save/Assign_13: inference/conv1_1_w (defined at G:\Document\Graduation_ project\AutoPortraitMatting-master\AutoPortraitMatting-master\TensorflowUtils_plus.py:66)
Original stack trace for 'save/Assign_13':
File "G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py", line 296, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py", line 296, in
Assign requires shapes of both tensors to match. lhs shape= [3,3,6,64] rhs shape= [3,3,3,64] [[node save/Assign_13 (defined at G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py:247) ]]
Errors may have originated from an input operation. Input Source operations connected to node save/Assign_13: inference/conv1_1_w (defined at G:\Document\Graduation_ project\AutoPortraitMatting-master\AutoPortraitMatting-master\TensorflowUtils_plus.py:66)
Original stack trace for 'save/Assign_13':
File "G:/Document/Graduation_ project/AutoPortraitMatting-master/AutoPortraitMatting-master/FCN_plus.py", line 296, in
进程已结束,退出代码 1
是tf的版本问题吗,但看起来报错是model不匹配
May I ask if you have downloaded the data set of your data folder successfully? I cannot download it through Matlab, could you share it?