from keras.utils import to_categorical
module ‘tensorflow.compat.v2’ has no attribute ‘__internal__
from keras.utils import to_categorical
$ python testerr.py
Using TensorFlow backend.
Traceback (most recent call last):
File “testerr.py”, line 5, in
from keras.utils import to_categorical
File “/home/sqxiong/anaconda3/envs/tens/lib/python3.6/site-packages/keras/__init__.py”, line 3, in
from . import utils
File “/home/sqxiong/anaconda3/envs/tens/lib/python3.6/site-packages/keras/utils/__init__.py”, line 26, in
from .vis_utils import model_to_dot
File “/home/sqxiong/anaconda3/envs/tens/lib/python3.6/site-packages/keras/utils/vis_utils.py”, line 7, in
from ..models import Model
File “/home/sqxiong/anaconda3/envs/tens/lib/python3.6/site-packages/keras/models.py”, line 10, in
from .engine.input_layer import Input
File “/home/sqxiong/anaconda3/envs/tens/lib/python3.6/site-packages/keras/engine/__init__.py”, line 3, in
from .input_layer import Input
File “/home/sqxiong/anaconda3/envs/tens/lib/python3.6/site-packages/keras/engine/input_layer.py”, line 7, in
from .base_layer import Layer
File “/home/sqxiong/anaconda3/envs/tens/lib/python3.6/site-packages/keras/engine/base_layer.py”, line 12, in
from .. import initializers
File “/home/sqxiong/anaconda3/envs/tens/lib/python3.6/site-packages/keras/initializers/服务器托管网__init__.py”, line 124, in
populate_deserializable_objects()
File “/home/sqxiong/anaconda3/envs/tens/lib/python3.6/site-packages/keras/initializers/__init__.py”, line 49, in populate_deserializable_objects
LOCAL.GENERATED_WITH_V2 = tf.__internal__.tf2.enabled()
AttributeError: module ‘tensorflow.compat.v2’ has no attribute ‘__internal__’
(tens) [sqxiong@ibiomed plek_attention]$ python testerr.py ^C
(tens) [sqxiong@ibiomed plek_attention]$ vim testerr.py
服务器托管,北京服务器托管,服务器租用 ht服务器托管网tp://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
2023年8月PMP、PMI-ACP、PMI-PBA、PgMP考试终于公布啦! 从2023年10月16日(美国东部时间)开始,2023年8月中国大陆考试的成绩将于大约一周内上传到PMI网站! 成绩是分批出的,如果暂时没查到成绩的同学请耐心等待,预计一周内成绩会…