Software used:
- Tensorflow python, version 2.12
- VSCode Jupyter Notebooks
- Conda env using python 3.9
Hardware
- Mac M1
I run this notebook provided in the computer vision tutorials:
It does run fine in the cloud however when I run locally, it does run and plot the images but when it gets to this network:
model = Sequential(
[
layers.RandomFlip("horizontal", input_shape=(img_height, img_width, 3)),
layers.RandomRotation(0.1),
layers.RandomZoom(0.1),
layers.Rescaling(1.0 / 255),
layers.Conv2D(16, 3, padding="same", activation="relu"),
layers.MaxPooling2D(pool_size=(2, 2)),
layers.Conv2D(32, 3, padding="same", activation="relu"),
layers.MaxPooling2D(pool_size=(2, 2)),
layers.Conv2D(64, 3, padding="same", activation="relu"),
layers.MaxPooling2D(pool_size=(2, 2)),
layers.Dropout(0.2),
layers.Flatten(),
# layers.Dense(128, activation="relu"),
layers.Dense(num_classes, name="output"),
]
)
It crashes with the useless error:
Canceled future for execute_request message before replies were done
The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure.
And the logs are also quite cryptic:
2023-06-08 16:54:53.890162: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_0' with dtype string and shape [2936]
[[{{node Placeholder/_0}}]]
16:54:54.161 [info] Dispose Kernel process 44714.
16:54:54.162 [error] Raw kernel process exited code: undefined
16:54:54.163 [error] Error in waiting for cell to complete Error: Canceled future for execute_request message before replies were done
at t.KernelShellFutureHandler.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2023.4.1011241018-darwin-arm64/out/extension.node.js:2:32419)
at ~/.vscode-server/extensions/ms-toolsai.jupyter-2023.4.1011241018-darwin-arm64/out/extension.node.js:2:51471
at Map.forEach (<anonymous>)
at v._clearKernelState (~/.vscode-server/extensions/ms-toolsai.jupyter-2023.4.1011241018-darwin-arm64/out/extension.node.js:2:51456)
at v.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2023.4.1011241018-darwin-arm64/out/extension.node.js:2:44938)
at ~/.vscode-server/extensions/ms-toolsai.jupyter-2023.4.1011241018-darwin-arm64/out/extension.node.js:24:105531
at te (~/.vscode-server/extensions/ms-toolsai.jupyter-2023.4.1011241018-darwin-arm64/out/extension.node.js:2:1587099)
at Zg.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2023.4.1011241018-darwin-arm64/out/extension.node.js:24:105507)
at nv.dispose (~/.vscode-server/extensions/ms-toolsai.jupyter-2023.4.1011241018-darwin-arm64/out/extension.node.js:24:112790)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
16:54:54.163 [warn] Cell completed with errors {
message: 'Canceled future for execute_request message before replies were done'
}
16:54:54.164 [warn] Cancel all remaining cells due to cancellation or failure in execution
Any help?