ObstructionRemoval icon indicating copy to clipboard operation
ObstructionRemoval copied to clipboard

TypeError: nn() got an unexpected keyword argument 'reuse'

Open max96min opened this issue 4 years ago • 6 comments

Hello I have a trouble to test this please help me

CUDA_VISIBLEDEVICES=0 python3 test_fence.py 544 960 2020-05-08 15:32:38.519022: E tensorflow/stream_executor/cuda/cuda_driver.cc:397] failed call to cuInit: CUDA_ERROR_NO_DEVICE 2020-05-08 15:32:38.519086: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:163] retrieving CUDA diagnostic information for host: max 2020-05-08 15:32:38.519105: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:170] hostname: max 2020-05-08 15:32:38.519153: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:194] libcuda reported version is: 384.130.0 2020-05-08 15:32:38.519200: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:198] kernel reported version is: 384.130.0 2020-05-08 15:32:38.519228: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:305] kernel version seems to match DSO: 384.130.0 Building model... WARNING:tensorflow:From /home/max/anaconda3/envs/py36_holo/lib/python3.6/site-packages/tensorflow/python/keras/initializers.py:104: calling VarianceScaling.init (from tensorflow.python.ops.init_ops) with distribution=normal is deprecated and will be removed in a future version. Instructions for updating: normal is a deprecated alias for truncated_normal ... model built. Loading model checkpoint tfoptflow/tfoptflow/models/pwcnet-lg-6-2-multisteps-chairsthingsmix/pwcnet.ckpt-595000 for eval or testing...

INFO:tensorflow:Restoring parameters from tfoptflow/tfoptflow/models/pwcnet-lg-6-2-multisteps-chairsthingsmix/pwcnet.ckpt-595000 ... model loaded

Model Configuration: verbose True ckpt_path tfoptflow/tfoptflow/models/pwcnet-lg-6-2-multisteps-chairsthingsmix/pwcnet.ckpt-595000 x_dtype <dtype: 'float32'> x_shape [2, None, None, 3] y_dtype <dtype: 'float32'> y_shape [None, None, 2] gpu_devices ['/device:CPU:0'] controller /device:CPU:0 batch_size 1 use_tf_data True use_mixed_precision False pyr_lvls 6 flow_pred_lvl 2 search_range 4 use_dense_cx True use_res_cx True mode test trainable params 14079050 Traceback (most recent call last): File "test_fence.py", line 280, in int(np.ceil(float(CROP_PATCH_W // (2 ** 3)) / 64.0)) * 64) File "test_fence.py", line 165, in PWC_full pred_labels, _ = nn.nn(PWC_input, reuse=tf.AUTO_REUSE) TypeError: nn() got an unexpected keyword argument 'reuse'

max96min avatar May 08 '20 07:05 max96min

hi, how to solve this problem?

ersanliqiao avatar Jun 03 '20 12:06 ersanliqiao

@max96min what version of Tensorflow are you using?

k4rth33k avatar Jun 04 '20 03:06 k4rth33k

@max96min what version of Tensorflow are you using?

same version of instruction - tensorflow 1.10.0

max96min avatar Jun 04 '20 05:06 max96min

Please use file of model_pwcnet.py in this project, not the raw project! Then problem is solved

ersanliqiao avatar Jun 04 '20 06:06 ersanliqiao

@max96min what version of Tensorflow are you using?

same version of instruction - tensorflow 1.10.0

Please use file of model_pwcnet.py in this project, not the raw project! Then problem is solved

ersanliqiao avatar Jun 04 '20 06:06 ersanliqiao

@max96min what version of Tensorflow are you using?

same version of instruction - tensorflow 1.10.0

Please use file of model_pwcnet.py in this project, not the raw project! Then problem is solved

how to modify code, I meet a same problem

wojiaohumaocheng avatar Nov 18 '20 06:11 wojiaohumaocheng