【问题标题】:Google Colab crash/unknown error when running keras model.predict()运行 keras model.predict() 时 Google Colab 崩溃/未知错误
【发布时间】:2020-11-15 02:17:41
【问题描述】:

我正在用 keras 训练模型。 model.fit() 正在工作并且模型经过训练,但是当我运行 model.predict 时,google colab 会话崩溃。 这是日志:

Nov 15, 2020, 3:04:50 AM WARNING WARNING:root:kernel b48211a4-a3e6-44f4-8082-89f69da39d21 restarted
Nov 15, 2020, 3:04:50 AM INFO KernelRestarter: restarting kernel (1/5), keep random ports
Nov 15, 2020, 3:04:47 AM WARNING 2020-11-15 02:04:47.189399: F tensorflow/stream_executor/cuda/cuda_dnn.cc:533] Check failed: cudnnSetTensorNdDescriptor(handle_.get(), elem_type, nd, dims.data(), strides.data()) == CUDNN_STATUS_SUCCESS (9 vs. 0)batch_descriptor: {count: 20 feature_map_count: 512 spatial: 399 598 value_min: 0.000000 value_max: 0.000000 layout: BatchDepthYX}
Nov 15, 2020, 3:04:47 AM WARNING 2020-11-15 02:04:47.189282: W tensorflow/core/kernels/gpu_utils.cc:49] Failed to allocate memory for convolution redzone checking; skipping this check. This is benign and only means that we won't check cudnn for out-of-bounds reads and writes. This message will only be printed once.

【问题讨论】:

    标签: tensorflow keras crash-reports predict google-colaboratory


    【解决方案1】:

    它说你没有足够的 RAM,这意味着你的模型和数据在 colab 上占用了大量 RAM,尽量不要加载所有数据,并在使用后从变量、列表或 numpy 数组中删除数据,del 关键字.

    您也可以减少批量大小。

    【讨论】:

      猜你喜欢
      • 2021-03-14
      • 2022-06-10
      • 2021-06-01
      • 1970-01-01
      • 2020-04-29
      • 2019-08-25
      • 2020-08-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多