【问题标题】:Which version of gast for TF 1.15.? (Autograph warning)TF 1.15 的 gast 版本是什么? (签名警告)
【发布时间】:2021-12-05 10:43:30
【问题描述】:

我正在使用 Google Colab 复制本教程: predict CLV with Deep Neural Networks

它有点旧,使用的是 Tensorflow 版本:1.10

%tensorflow_version 1.x
import tensorflow as tf

安装版本:1.15.2。

现在在我的输入中我有好几次警告:

WARNING:tensorflow:Entity <function parse_csv at 0x7fd13d09b4d0> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: Bad argument number for Name: 3, expecting 4

还有这个:

WARNING:tensorflow:Entity <bound method _DNNModel.call of <tensorflow_estimator.python.estimator.canned.dnn._DNNModel object at 0x7fd1381ca2d0>> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Index'

我的输出如下所示:

WARNING:tensorflow:Training with estimator made no steps. Perhaps input is empty or misspecified.
INFO:tensorflow:Loss for final step: None.
({'average_loss': 0.0,
  'global_step': 0,
  'label/mean': 0.0,
  'loss': 0.0,
  'prediction/mean': 0.0,
  'rmse': 0.0},
 [])

我在网上发现了一些关于 TF 2.x 版本的类似问题,答案是使用其他版本的 gast:

  • TF 1.15.2 需要哪个版本?
  • 如何降级当前版本?

如果这不是问题,那会是什么?

【问题讨论】:

    标签: python tensorflow machine-learning deep-learning version


    【解决方案1】:

    对于Tensorflow 1.15.2,需要的gast版本是0.2.2

    关于警告,可以使用以下代码关闭这些 Autograph 警告

    import logging, os
    logging.disable(logging.WARNING)
    os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
    import tensorflow as tf
    

    【讨论】:

      猜你喜欢
      • 2012-01-05
      • 2021-03-30
      • 2019-07-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多