首页 > 解决方案 > 不可散列的类型:拟合模型时的“列表” - tensorflow

问题描述

我正在尝试遵循https://github.com/arthurflor23/handwritten-text-recognition/blob/master/src/tutorial.ipynb上的教程。尝试拟合模型时,出现以下错误unhashable type: 'list'。我安装了以下软件包:

tensorboard==2.0.2
tensorflow-estimator==2.0.1
tensorflow-gpu==2.0.0 

CUDA Version 10.0.130 

尝试安装显示的tensorflow-gpu==2.1.0-rc0包时,模型开始训练,但我似乎无法使用我的 gpu,它看不到它。但是,当使用该2.0.2版本运行程序时,我得到一个TypeError: unhashable type: 'list'at

h = model.fit(x=dtgen.next_train_batch(),
    epochs=epochs,
    steps_per_epoch=dtgen.steps['train'],
    validation_data=dtgen.next_valid_batch(),
    validation_steps=dtgen.steps['valid'],
    callbacks=callbacks,
    shuffle=True,
    verbose=1)

仅使用我的 CPU 训练模型需要很长时间,因此任何关于如何让我的 gpu 开始训练的建议都将不胜感激。谢谢你。

标签: pythontensorflowkerasdeep-learning

解决方案


推荐阅读