【问题标题】:TypeError: 'Tensor' object is not callable Ludwig UberTypeError:“张量”对象不可调用 Ludwig Uber
【发布时间】:2019-09-27 18:29:56
【问题描述】:

我是 Uber Ludwig 的新手,我在标题中遇到错误, StackTrace 是:

Epoch   1
Training: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:56<00:00,  1.76it/s]
Traceback (most recent call last):
  File "/usr/local/bin/ludwig", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/ludwig/cli.py", line 108, in main
    CLI()
  File "/usr/local/lib/python3.7/dist-packages/ludwig/cli.py", line 64, in __init__
    getattr(self, args.command)()
  File "/usr/local/lib/python3.7/dist-packages/ludwig/cli.py", line 69, in experiment
    experiment.cli(sys.argv[2:])
  File "/usr/local/lib/python3.7/dist-packages/ludwig/experiment.py", line 472, in cli
    experiment(**vars(args))
  File "/usr/local/lib/python3.7/dist-packages/ludwig/experiment.py", line 203, in experiment
    **kwargs
  File "/usr/local/lib/python3.7/dist-packages/ludwig/train.py", line 311, in full_train
    debug=debug
  File "/usr/local/lib/python3.7/dist-packages/ludwig/train.py", line 475, in train
    **model_definition['training']
  File "/usr/local/lib/python3.7/dist-packages/ludwig/models/model.py", line 576, in train
    bucketing_field
TypeError: 'Tensor' object is not callable

所以我有一个 CSV 文件,其中包含以下格式的数据:

elo\\,evaluation
1063\\,"12\\, 30\\, 16\\, 2\\, 17\\, 28\\, 1\\, 5\\, 7\\, 0\\, 39\\, 0"
1034\\,"18\\, 13\\, 13\\, 1\\, 8\\, 20\\, 35\\, 0\\, 20\\, 11\\, 8\\, 9"
1713\\,"23\\, 13\\, 26\\, 35\\, 36\\, 33\\, 14\\, 20\\, 7\\, 11\\, 1\\, 3\\, 5\\, 14\\, 16\\, 2\\, 6\\, 19\\, 60\\, 193\\, 58\\, 100\\, 82\\, 24\\, 2985\\, 1\\, 230\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0"
1812\\,"1\\, 2\\, 53\\, 3\\, 66\\, 5\\, 14\\, 8\\, 56\\, 29\\, 7\\, 30\\, 14\\, 15\\, 10\\, 14\\, 4\\, 34\\, 1\\, 22\\, 15\\, 26\\, 133\\, 6\\, 59\\, 0\\, 257\\, 553\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0"
1718\\,"21\\, 83\\, 23\\, 6\\, 93\\, 8\\, 26\\, 25\\, 19\\, 12\\, 21\\, 23\\, 10\\, 5\\, 6\\, 12\\, 6\\, 11\\, 7\\, 38\\, 0\\, 3\\, 33\\, 18\\, 11\\, 6\\, 22\\, 14\\, 21\\, 6\\, 19\\, 13\\, 8\\, 0\\, 4158\\, 0\\, 5\\, 1\\, 0\\, 1\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0"
1743\\,"4\\, 17\\, 22\\, 25\\, 36\\, 7\\, 63\\, 5\\, 4\\, 11\\, 26\\, 12\\, 0\\, 17\\, 3\\, 2\\, 10\\, 16\\, 3\\, 19\\, 17\\, 13\\, 2\\, 5\\, 49\\, 40\\, 7\\, 1\\, 42\\, 10\\, 2\\, 36\\, 48\\, 8\\, 1175\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0\\, 0"

现在我的模型定义是:

input_features:
  -
    name: evaluation
    type: sequence
output_features:
  -
    name: elo
    type: numerical

以及我在 cli 上运行的命令:

ludwig experiment --data_csv evaluated.csv --model_definition_file modelDefinition.yml --output_directory results

现在我不知道为什么会发生错误,有人可以帮助我吗?

【问题讨论】:

    标签: python-3.x tensorflow machine-learning ludwig


    【解决方案1】:

    由于评估在 ludwig 中是受保护的关键字,请尝试将输入特征的名称更改为评估以外的名称。

    【讨论】:

      猜你喜欢
      • 2017-06-14
      • 1970-01-01
      • 2020-07-17
      • 1970-01-01
      • 1970-01-01
      • 2017-06-19
      • 1970-01-01
      • 2020-12-15
      • 2018-12-25
      相关资源
      最近更新 更多