Problem Description:
In TF2. X environment, the user-defined loss function error, want to view y_ PRED and Y_ True, using K. Eval (y)_ pred),y_ Pred.numpy() error:
attributeerror: ‘tense’ object has no attribute ‘_ numpy’
resolvent:
Set run in model. Compile()_ When eagerly is changed to true, you can view it, but the running speed will be slow
Analysis of the reasons:
run_ Eagerly parameter setting model is to create dynamic graph or static graph (default is static graph, false)
running eagerly means that your model will run step by step, just like Python code. Dynamic graph mechanism may make the model run slowly, because it can’t use the optimization method of static graph in previous versions; But its advantage is that it is easy for you to debug
by default, we will compile your model and make it a static graph to get the best performance
reference blog
in TF2. X, by default, every tenor has numpy, but there is no GitHub problem description in keras
Read More:
- Problem: attributeerror: ‘tensor’ object has no attribute ‘creator’
- AttributeError: ‘numpy.ndarray‘ object has no attribute ‘softmax‘
- Debug | AttributeError: ‘numpy.int64‘ object has no attribute ‘to_pydatetime‘
- AttributeError: module ‘numpy‘ has no attribute ‘getbuffer‘
- Attributeerror: object has no attribute
- PyTorch – AttributeError: ‘bool‘ object has no attribute ‘sum‘
- AttributeError: ‘_io.TextIOWrapper‘ object has no attribute ‘softspace‘
- Attributeerror: ‘dataframe’ object has no attribute ‘IX’ error
- Python AttributeError: ‘bool‘ object has no attribute ‘ui‘
- Attributeerror: ‘bytes’ object has no attribute’ encode ‘
- AttributeError: ‘dict‘ object has no attribute ‘iteritems‘
- Keras Model AttributeError:’str‘ object has no attribute ’call‘
- AttributeError: ‘NoneType‘ object has no attribute ‘append‘
- python gensim AttributeError: ‘Doc2Vec‘ object has no attribute ‘dv‘
- AttributeError: ‘WebDriver‘ object has no attribute ‘w3c‘
- AttributeError: ‘NoneType‘ object has no attribute ‘shape‘
- AttributeError: ‘PipelinedRDD‘ object has no attribute ‘toDF‘
- Solution: attributeerror: type object ‘ioloop’ has no attribute ‘initialized’
- AttributeError: ‘Settings’ object has no attribute ‘ROOT_URLCONF’
- Attributeerror: ‘STR’ object has no attribute ‘decode’ solution: the pro test is successful.