-
Notifications
You must be signed in to change notification settings - Fork 35
Description
I followed the instruction and failed on the testing session on a computer without GPU.
Following is the error info. The fatal error seems to be "Shape mismatch: The variable shape (32, 2), and the assigned value shape (32, 1) are incompatible." But I don't know whether it has to do with the GPU.
2022-08-02 14:42:14.891607: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-08-02 14:42:14.891711: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
positive samples: 3
negative samples: 4
training image rotated
training image rotated
training image rotated
Total positive files after augmentation: 9
Total negative files after augmentation: 12
positive samples: 12
negative samples: 16
positive data loaded.
negative data loaded.
Total Samples Loaded: 30
[[0.77935225 0.78643727 0.78036439 ... 0.11032388 0.11234818 0.10931174]
[0.10931174 0.11234818 0.11032388 ... 0.78036439 0.78643727 0.77935225]
[0.50303644 0.71457487 0.69939274 ... 0.5688259 0.57085019 0.57388663]
...
[0. 0. 0. ... 0. 0. 0. ]
[0. 0. 0. ... 0. 0. 0. ]
[0. 0. 0. ... 0. 0. 0. ]]
[[-0.01953819 -0.0017762 -0.0017762 ... -0.0017762 -0.00888099
0.008881 ]
[-0.00888094 0.00888105 0.00177626 ... 0.00177626 0.00177626
0.01953825]
[-0.34991118 0.03730018 -0.03019538 ... 0.0017762 -0.01243339
-0.0017762 ]
...
[ 0. 0. 0. ... 0. 0.
0. ]
[ 0. 0. 0. ... 0. 0.
0. ]
[ 0. 0. 0. ... 0. 0.
0. ]]
[[0.]
[0.]
[0.]
[0.]
[0.]
[0.]
[0.]
[0.]
[0.]
[1.]
[1.]
[1.]
[1.]
[1.]
[1.]
[1.]
[1.]
[1.]
[1.]
[1.]
[1.]
[0.]
[0.]
[0.]
[0.]
[0.]
[0.]
[0.]]
2022-08-02 14:42:34.738089: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2022-08-02 14:42:34.738195: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2022-08-02 14:42:34.750206: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: IMASONLIU-PC5
2022-08-02 14:42:34.750471: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: IMASONLIU-PC5
2022-08-02 14:42:34.751354: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\Moire-Pattern-Detection-master\Moire-Pattern-Detection-master\src\test.py", line 66, in
main(parse_arguments(sys.argv[1:]))
File "C:\Users\Administrator\Desktop\Moire-Pattern-Detection-master\Moire-Pattern-Detection-master\src\test.py", line 45, in main
CNN_model.load_weights(weights_file)
File "C:\Users\Administrator\anaconda3\lib\site-packages\keras\utils\traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\Administrator\anaconda3\lib\site-packages\keras\backend.py", line 4028, in batch_set_value
x.assign(np.asarray(value, dtype=dtype_numpy(x)))
ValueError: Cannot assign value to variable ' dense_1/kernel:0': Shape mismatch.The variable shape (32, 2), and the assigned value shape (32, 1) are incompatible.