我具有运行以下命令的脚本 predict :
# run predictions
DOCKER_RUN="docker run
--entrypoint entrypoints/entrypoint.predict.cpu.sh \
-v "$IMAGE_SOURCE":/src/$BASENAME_IS
-v "$WEIGHTS_FILE":/weights.hdf5
$DOCKER_IMAGE $BASE_MODEL_NAME /weights.hdf5 /src/$BASENAME_IS"
eval $DOCKER_RUN
我使用的是Mac,当我尝试运行以下命令时:
/predict --docker-image nima-cpu --base-model-name MobileNet --weights-file $(pwd)/models/MobileNet/weights_mobilenet_technical_0.11.hdf5 --image-source $(pwd)/src/tests/test_images/42039.jpg
我得到的输出
File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (file read failed: time = Sun Oct 18 09:18:54 2020
, filename = '/weights.hdf5', file descriptor = 3, errno = 21, error message = 'Is a directory', buf = 0x7fff466d1fd0, total read size = 8, bytes this sub-read = 8, bytes actually read = 18446744073709551615, offset = 0)
但这是带有预测的文件。不是目录。 请帮我解决问题。为什么我不能打开那个weights.hdf5文件?