TypeError: __init__() 在 colab 中得到了一个意外的关键字参数 'gpus'。来源:robotflow‖程序

问题描述 投票:0回答:0

your text``early_stop_callback = EarlyStopping(     monitor="val_loss",      min_delta=0.00,      patience=10,      verbose=False,      mode="min",     )

   your text
checkpoint_callback = ModelCheckpoint(save_top_k=1, monitor="val_loss")

your text
trainer = pl.Trainer(
your text
gpus=1,
your text
callbacks=[early_stop_callback, checkpoint_callback],
your text
max_epochs=500,
your text
val_check_interval=len(train_dataloader),
your text
your text
trainer.fit(segformer_finetuner)#原始源码
your text
-------------------------------
your text
错误信息

your text
**TypeError Traceback(最后一次调用)
your text
()
your text
9 checkpoint_callback = ModelCheckpoint(save_top_k=1, monitor="val_loss")
your text
10

your text
---> 11 trainer = pl.Trainer( 12个GPU=1个, 13 个回调=[early_stop_callback, checkpoint_callback],

your text
/usr/local/lib/python3.9/dist-packages/pytorch_lightning/utilities/argparse.py 在
your text
insert_env_defaults(self, *args, **kwargs)
your text
67 68 # 所有的参数都已经转移到 kwargs ---> 69 返回 fn(self, **kwargs) 70 71 返回 cast(_T, insert_env_defaults)

T

your text
ypeError: init() 有一个意外的关键字参数 'gpus'** ------------------------------- 这些问题难倒了我和 ChatGPT。请问有没有专业的网友有什么解决办法。我将非常感谢你的帮助。请保存我的论文。

我想知道是否有人在 RobotFlow 上使用过“train-segformer-segmentation-on-custom-data.ipynb”程序。

pytorch_lightning‖version2.0.1.post0 torch2.0.0+cu118 ytorch-lightning 变形金刚数据集 roboflow==0.2.7

我尝试更新到最新版本。 我尝试删除 GPU 我要结果

python image-segmentation nltk-trainer
© www.soinside.com 2019 - 2024. All rights reserved.