相关疑难解决方法(0)

TensorFlow没有属性"with_dependencies"

我想使用该tf.with_dependencies函数来保存我的RNN状态.出于某种原因,我收到以下错误.

Traceback (most recent call last):
  File "/home/chase/workspace/AudioRNN/audiornn.py", line 56, in <module>
    tf.with_dependencies([expected_output], input_tensor)
AttributeError: module 'tensorflow' has no attribute 'with_dependencies'
Run Code Online (Sandbox Code Playgroud)

我的tensorflow代码的其余部分运行正常.我在eclipse中,我按Ctrl +单击tf.with_dependencies它将我带到源代码.我注意到该tf.group函数也在这个文件中,我可以称之为正常.有什么问题tf.with_dependencies?我在Ubuntu 16.04上.我正在使用python 3和tensorflow的最新版本.

这是dir(tf)根据要求的印刷品.

AggregationMethod
Assert
AttrValue
ConfigProto
DType
DeviceSpec
Dimension
Event
FIFOQueue
FixedLenFeature
FixedLenSequenceFeature
FixedLengthRecordReader
GPUOptions
GRAPH_DEF_VERSION
GRAPH_DEF_VERSION_MIN_CONSUMER
GRAPH_DEF_VERSION_MIN_PRODUCER
Graph
GraphDef
GraphKeys
GraphOptions
HistogramProto
IdentityReader
IndexedSlices
InteractiveSession
LogMessage
NameAttrList
NoGradient
NodeDef
OpError
Operation
OptimizerOptions
PaddingFIFOQueue
Print
QUANTIZED_DTYPES
QueueBase
RandomShuffleQueue
ReaderBase
RegisterGradient
RegisterShape
RunMetadata
RunOptions
Session
SessionLog
SparseTensor
SparseTensorValue
Summary …
Run Code Online (Sandbox Code Playgroud)

tensorflow

5
推荐指数
1
解决办法
3140
查看次数

标签 统计

tensorflow ×1