multiprocessing - 由于 IPython 和 Windows 的限制,python 多处理现在不可用。所以将`number_workers`改为0以避免卡住
问题描述
#id first_training
#caption Results from the first training
# CLICK ME
from fastai.vision.all import *
path = untar_data(URLs.PETS)/'images'
def is_cat(x): return x[0].isupper()
dls = ImageDataLoaders.from_name_func(
path, get_image_files(path), valid_pct=0.2, seed=42,
label_func=is_cat, item_tfms=Resize(224))
learn = cnn_learner(dls, resnet34, metrics=error_rate)
learn.fine_tune(1)
由于 IPython 和 Windows 的限制,python 多处理现在不可用。所以number_workers
改为0避免卡住
嗨,我正在学习 Fastai 书,我在没有 colab 或图纸空间的情况下运行此代码。
但出乎我的意料,这需要很长时间(我的电脑是工作站)
但我想知道我是否清除了那个错误
也许增加'number_workers',它会比以前快得多。
如何解决这个问题呢?
谢谢
解决方案
推荐阅读
- javascript - 如何在 process.stdin nodejs 上发出事件结束
- dafny - Dafny 断言语句是否具有效力?
- python - Python FFT:频移
- sql - ora-01821 日期格式无法识别
- javascript - 控制多个范围滑块 Django 表单
- python - 打印是 3 的幂的数字。我可以更好地编写这个程序吗?
- python - 我如何使用 tkinter 按钮导入文件
- python - 将 Python 与 SQL Server 连接起来
- cmake - 添加消毒剂仅用于调试 CMake 中的构建
- google-cloud-platform - 谷歌云平台 Kubernetes 的云位置(GKE)