tensorflow 名称:模型中未定义“self”[已关闭]

nuypyhwy  于 2023-08-06  发布在  其他
关注(0)|答案(1)|浏览(105)

**已关闭。**此问题需要debugging details。它目前不接受回答。

编辑问题以包括desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将有助于其他人回答这个问题。
17天前关闭。
Improve this question
我正在使用tfr模块进行时间序列预测,并定义了一个如下的训练模型”-

  1. #Train Model
  2. best_model = tfr.tfr_models.Simple_Transformer.train( self = ,
  3. train_dataset=trainset,
  4. test_dataset=testset,
  5. loss_function='QuantileLoss_Weighted(quantiles=[0.6])',
  6. metric='MSE',
  7. learning_rate=0.0001,
  8. max_epochs=2,
  9. min_epochs=1,
  10. train_steps_per_epoch=10,
  11. test_steps_per_epoch=5,
  12. patience=2,
  13. weighted_training=True,
  14. model_prefix='test_models\tfr_model',
  15. logdir='test_logs')

字符串
我不知道在自我论证中应该传递什么?

vzgqcmou

vzgqcmou1#

您在注解中提到的错误表明您还没有创建对象,并且在这样做之前调用了方法。要修复它,首先创建一个对象,然后调用对象上的train方法。
尝试看起来更像的东西:第一个月

相关问题