我正在训练 CNN 模型并收到此错误。
NotFoundError Traceback (most recent call last)
c:\Users\Rohit\Desktop\New folder(2)\2_1_train_age_model.ipynb Cell 31 line 3
1 # Fitting the above created CNN model.
----> 3 final_cnn_history = final_cnn.fit(train_aug_dataset,
4 batch_size = 33,
5 validation_data=test_dataset,
6 epochs=15,
7 callbacks=[tensorboard, checkpoint],
8 shuffle=False
9 )
10 print("Done")
File c:\Users\Rohit\anaconda3\envs\py39\lib\site-packages\keras\utils\traceback_utils.py:67, in filter_traceback.<locals>.error_handler(*args, **kwargs)
65 except Exception as e: # pylint: disable=broad-except
66 filtered_tb = _process_traceback_frames(e.__traceback__)
---> 67 raise e.with_traceback(filtered_tb) from None
68 finally:
69 del filtered_tb
File c:\Users\Rohit\anaconda3\envs\py39\lib\site-packages\tensorflow\python\eager\execute.py:54, in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
52 try:
53 ctx.ensure_initialized()
---> 54 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
55 inputs, attrs, num_outputs)
...
; No such process
[[{{node ReadFile}}]]
[[IteratorGetNext]]
0 successful operations.
0 derived errors ignored. [Op:__inference_test_function_29562]
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
这是模型
final_cnn = Sequential()
final_cnn.add(Conv2D(filters=32, kernel_size=3, activation='tanh', input_shape=(16, 16, 1)))
final_cnn.add(AveragePooling2D(pool_size=(2,2)))
final_cnn.add(Conv2D(filters=32, kernel_size=3, activation='tanh'))
final_cnn.add(AveragePooling2D(pool_size=(2,2)))
final_cnn.add(Dense(64, activation='tanh'))
final_cnn.add(AveragePooling2D(pool_size=(2,2)))
final_cnn.add(GlobalAveragePooling2D())
# Output layer with 7 nodes (equal to the no. of classes).
final_cnn.add(Dense(7, activation='softmax'))
final_cnn.summary()
print("Done")
起初,我以为这是我的 CSV 文件的问题,其中我使用了图像的目录及其年龄。 但经过几次谷歌搜索后,我意识到这可能是我的 tf 版本的问题,
我正在使用cuda 11.2和cudnn 8.1,我已经尝试过Python版本3.10和3.9以及tf版本2.10、2.7、2.8,但这个错误仍然存在。
请告诉我这个错误是什么原因,是版本问题还是其他问题?
我认为这个链接可能对您有帮助。