【问题标题】:TensorFlow -- Duplicate plugins for name projector -- Anaconda PromptTensorFlow——名称投影仪的重复插件——Anaconda Prompt
【发布时间】:2020-07-18 11:27:48
【问题描述】:

我正在尝试对 mnist 进行通用分析,如下所示。

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import math

import tensorflow as tf

# The MNIST dataset has 10 classes, representing the digits 0 through 9.
NUM_CLASSES = 10

# The MNIST images are always 28x28 pixels.
IMAGE_SIZE = 28
IMAGE_PIXELS = IMAGE_SIZE * IMAGE_SIZE


def inference(images, hidden1_units, hidden2_units):
  """Build the MNIST model up to where it may be used for inference.
  Args:
    images: Images placeholder, from inputs().
    hidden1_units: Size of the first hidden layer.
    hidden2_units: Size of the second hidden layer.
  Returns:
    softmax_linear: Output tensor with the computed logits.
  """
  # Hidden 1
  with tf.compat.v1.name_scope('hidden1'):
    weights = tf.Variable(
        tf.random.truncated_normal(
            [IMAGE_PIXELS, hidden1_units],
            stddev=1.0 / math.sqrt(float(IMAGE_PIXELS))), name='weights')
    biases = tf.Variable(tf.zeros([hidden1_units]),
                         name='biases')
    hidden1 = tf.nn.relu(tf.matmul(images, weights) + biases)
  # Hidden 2
  with tf.compat.v1.name_scope('hidden2'):
    weights = tf.Variable(
        tf.random.truncated_normal(
            [hidden1_units, hidden2_units],
            stddev=1.0 / math.sqrt(float(hidden1_units))), name='weights')
    biases = tf.Variable(tf.zeros([hidden2_units]),
                         name='biases')
    hidden2 = tf.nn.relu(tf.matmul(hidden1, weights) + biases)
  # Linear
  with tf.compat.v1.name_scope('softmax_linear'):
    weights = tf.Variable(
        tf.random.truncated_normal(
            [hidden2_units, NUM_CLASSES],
            stddev=1.0 / math.sqrt(float(hidden2_units))), name='weights')
    biases = tf.Variable(tf.zeros([NUM_CLASSES]),
                         name='biases')
    logits = tf.matmul(hidden2, weights) + biases
  return logits


def loss(logits, labels):
  """Calculates the loss from the logits and the labels.
  Args:
    logits: Logits tensor, float - [batch_size, NUM_CLASSES].
    labels: Labels tensor, int32 - [batch_size].
  Returns:
    loss: Loss tensor of type float.
  """
  labels = tf.cast(labels, dtype=tf.int64)
  return tf.compat.v1.losses.sparse_softmax_cross_entropy(
      labels=labels, logits=logits)


def training(loss, learning_rate):
  """Sets up the training Ops.
  Creates a summarizer to track the loss over time in TensorBoard.
  Creates an optimizer and applies the gradients to all trainable variables.
  The Op returned by this function is what must be passed to the
  `sess.run()` call to cause the model to train.
  Args:
    loss: Loss tensor, from loss().
    learning_rate: The learning rate to use for gradient descent.
  Returns:
    train_op: The Op for training.
  """
  # Add a scalar summary for the snapshot loss.
  tf.compat.v1.summary.scalar('loss', loss)
  # Create the gradient descent optimizer with the given learning rate.
  optimizer = tf.compat.v1.train.GradientDescentOptimizer(learning_rate)
  # Create a variable to track the global step.
  global_step = tf.Variable(0, name='global_step', trainable=False)
  # Use the optimizer to apply the gradients that minimize the loss
  # (and also increment the global step counter) as a single training step.
  train_op = optimizer.minimize(loss, global_step=global_step)
  return train_op


def evaluation(logits, labels):
  """Evaluate the quality of the logits at predicting the label.
  Args:
    logits: Logits tensor, float - [batch_size, NUM_CLASSES].
    labels: Labels tensor, int32 - [batch_size], with values in the
      range [0, NUM_CLASSES).
  Returns:
    A scalar int32 tensor with the number of examples (out of batch_size)
    that were predicted correctly.
  """
  # For a classifier model, we can use the in_top_k Op.
  # It returns a bool tensor with shape [batch_size] that is true for
  # the examples where the label is in the top k (here k=1)
  # of all logits for that example.
  correct = tf.nn.in_top_k(predictions=logits, targets=labels, k=1)
  # Return the number of true entries.
  return tf.reduce_sum(input_tensor=tf.cast(correct, tf.int32))

我在 Spyder 中运行代码;运行良好。

然后,我把这个命令行放在 Anaconda Prompt 中。

tensorboard --logdir="C:/Users/ryans/mnist_tutorial/"

我在命令提示符中看到以下消息。

(base) C:\Users\ryans>tensorboard --logdir="C:/Users/ryans/mnist_tutorial/"
C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "C:\Users\ryans\Anaconda3\Scripts\tensorboard-script.py", line 10, in <module>
    sys.exit(run_main())
  File "C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\main.py", line 64, in run_main
    app.run(tensorboard.main, flags_parser=tensorboard.configure)
  File "C:\Users\ryans\Anaconda3\lib\site-packages\absl\app.py", line 299, in run
    _run_main(main, args)
  File "C:\Users\ryans\Anaconda3\lib\site-packages\absl\app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\program.py", line 228, in main
    server = self._make_server()
  File "C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\program.py", line 309, in _make_server
    self.assets_zip_provider)
  File "C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\backend\application.py", line 161, in standard_tensorboard_wsgi
    reload_task)
  File "C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\backend\application.py", line 194, in TensorBoardWSGIApp
    return TensorBoardWSGI(plugins, path_prefix)
  File "C:\Users\ryans\Anaconda3\lib\site-packages\tensorboard\backend\application.py", line 245, in __init__
    raise ValueError('Duplicate plugins for name %s' % plugin.plugin_name)
ValueError: Duplicate plugins for name projector

(base) C:\Users\ryans>

这是问题吗?在过去的几天里,我一直试图让这个工作。无论我做什么,我都无法让它工作。我想打开浏览器,输入“http://localhost:6006/”并查看 TensorBoard。我现在看到的只是一条消息,上面写着“无法连接”。想法?

更新:我卸载并重新安装了 tensorflow。然后,我运行了诊断脚本,得到了这个.....

### Diagnostics

<details>
<summary>Diagnostics output</summary>

``````
--- check: autoidentify
INFO: diagnose_tensorboard.py source unavailable

--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=7, micro=5, releaselevel='final', serial=0)
INFO: os.name: nt
INFO: os.uname(): N/A
INFO: sys.getwindowsversion(): sys.getwindowsversion(major=10, minor=0, build=17763, platform=2, service_pack='')

--- check: package_management
INFO: has conda-meta: True
INFO: $VIRTUAL_ENV: None

--- check: installed_packages
INFO: installed: tensorboard==2.0.2
INFO: installed: tensorflow==2.0.0
INFO: installed: tensorflow-estimator==2.0.1

--- check: tensorboard_python_version
INFO: tensorboard.version.VERSION: '2.0.2'

--- check: tensorflow_python_version
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\ryans\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
INFO: tensorflow.__version__: '1.14.0'
INFO: tensorflow.__git_version__: 'unknown'

--- check: tensorboard_binary_path
INFO: which tensorboard: b'C:\\Users\\ryans\\Anaconda3\\Scripts\\tensorboard.exe\r\nC:\\Users\\ryans\\AppData\\Local\\Programs\\Python\\Python38\\Scripts\\tensorboard.exe\r\n'

--- check: addrinfos
socket.has_ipv6 = True
socket.AF_UNSPEC = <AddressFamily.AF_UNSPEC: 0>
socket.SOCK_STREAM = <SocketKind.SOCK_STREAM: 1>
socket.AI_ADDRCONFIG = <AddressInfo.AI_ADDRCONFIG: 1024>
socket.AI_PASSIVE = <AddressInfo.AI_PASSIVE: 1>
Loopback flags: <AddressInfo.AI_ADDRCONFIG: 1024>
Loopback infos: [(<AddressFamily.AF_INET6: 23>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('::1', 0, 0, 0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('127.0.0.1', 0))]
Wildcard flags: <AddressInfo.AI_PASSIVE: 1>
Wildcard infos: [(<AddressFamily.AF_INET6: 23>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('::', 0, 0, 0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('0.0.0.0', 0))]

--- check: readable_fqdn
INFO: socket.getfqdn(): 'LAPTOP-CEDUMII6.nyc.rr.com'

--- check: stat_tensorboardinfo
INFO: directory: C:\Users\ryans\AppData\Local\Temp\.tensorboard-info
INFO: .tensorboard-info directory does not exist

--- check: source_trees_without_genfiles
INFO: tensorboard_roots (1): ['C:\\Users\\ryans\\Anaconda3\\lib\\site-packages']; bad_roots (0): []

--- check: full_pip_freeze
INFO: pip freeze --all:
absl-py==0.9.0
alabaster==0.7.12
altair==4.0.1
anaconda-client==1.7.2
anaconda-navigator==1.9.12
argh==0.26.2
asn1crypto==1.3.0
astor==0.8.1
astroid==2.3.3
atomicwrites==1.3.0
attrs==19.3.0
Automat==20.2.0
autopep8==1.4.4
Babel==2.8.0
backcall==0.1.0
backports.functools-lru-cache==1.6.1
backports.tempfile==1.0
backports.weakref==1.0.post1
bcrypt==3.1.7
beautifulsoup4==4.8.2
bleach==3.1.0
blis==0.4.1
boto3==1.11.14
botocore==1.14.14
bs4==0.0.1
cachetools==4.0.0
catalogue==1.0.0
catboost==0.22
certifi==2019.11.28
cffi==1.14.0
chardet==3.0.4
chart-studio==1.0.0
click==7.1.1
cloudpickle==1.3.0
clyent==1.2.2
colorama==0.3.9
colorlover==0.3.0
conda==4.8.3
conda-build==3.18.11
conda-package-handling==1.6.0
conda-verify==3.4.2
configparser==4.0.2
constantly==15.1.0
crayons==0.3.0
cryptography==2.8
cssselect==1.1.0
cufflinks==0.17.0
cycler==0.10.0
cymem==2.0.3
decorator==4.4.2
defusedxml==0.6.0
diff-match-patch==20181111
dill==0.3.1.1
doc2text==0.2.4
docutils==0.15.2
docx2txt==0.8
eli5==0.10.1
en-core-web-sm==2.2.5
entrypoints==0.3
feedparser==5.2.1
filelock==3.0.12
finance==0.2502
flake8==3.7.9
funcy==1.14
future==0.18.2
futures==3.1.1
fuzzywuzzy==0.18.0
gast==0.2.2
gensim==3.8.1
geographiclib==1.50
geopy==1.21.0
glob2==0.7
google-api-python-client==1.7.11
google-auth==1.10.0
google-auth-httplib2==0.0.3
google-auth-oauthlib==0.4.1
google-pasta==0.1.8
google-search-results==1.7.1
googleapis-common-protos==1.51.0
goslate==1.5.1
graphviz==0.13.2
grpcio==1.27.2
gspread==3.2.0
h5py==2.8.0
helpdev==0.6.10
httplib2==0.15.0
hyperlink==19.0.0
idna==2.9
imagesize==1.2.0
imbalanced-learn==0.6.2
imblearn==0.0
importlib-metadata==1.5.0
imutils==0.5.3
incremental==17.5.0
intervaltree==3.0.2
ipykernel==5.1.4
ipython==7.13.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
isort==4.3.21
jedi==0.14.1
Jinja2==2.11.1
jmespath==0.9.4
joblib==0.14.1
json5==0.9.3
jsonschema==3.2.0
jupyter-client==6.1.2
jupyter-core==4.6.3
jupyterlab==1.2.6
jupyterlab-server==1.1.0
Keras==2.3.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
keyring==21.1.0
kiwisolver==1.1.0
langdetect==1.0.8
lazy-object-proxy==1.4.3
libarchive-c==2.8
lightgbm==2.3.1
Markdown==3.1.1
MarkupSafe==1.1.1
matplotlib==3.2.1
mccabe==0.6.1
menuinst==1.4.16
mime==0.1.0
mistune==0.8.4
mkl-fft==1.0.6
mkl-random==1.0.1
mlxtend==0.17.2
mpl-finance==0.10.0
mplfinance==0.12.3a3
multitasking==0.0.9
murmurhash==1.0.2
mysql==0.0.2
mysqlclient==1.4.6
navigator-updater==0.2.1
nbconvert==5.6.1
nbformat==5.0.4
notebook==6.0.3
numpy==1.18.2
numpy-financial==1.0.0
numpydoc==0.9.2
oauth2client==4.1.3
oauthlib==3.1.0
olefile==0.46
opencv-python==4.2.0.32
opt-einsum==3.1.0
packaging==20.3
pandas==1.0.3
pandas-datareader==0.8.1
pandocfilters==1.4.2
paramiko==2.7.1
parsel==1.5.2
parso==0.5.2
pathtools==0.1.2
pdfminer==20191125
pdfminer.six==20200124
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.0.0
pip==20.0.2
pipupgrade==1.7.1
pkginfo==1.5.0.1
plac==1.1.3
plotly==4.5.4
pluggy==0.13.1
preshed==3.0.2
prometheus-client==0.7.1
promise==2.3
prompt-toolkit==3.0.4
Protego==0.1.16
protobuf==3.11.4
psutil==5.7.0
psycopg2==2.8.4
ptyprocess==0.6.0
py4j==0.10.7
pyasn1==0.4.8
pyasn1-modules==0.2.7
pycodestyle==2.5.0
pycosat==0.6.3
pycparser==2.20
pycryptodome==3.9.4
PyDictionary==1.5.2
PyDispatcher==2.0.5
pydocstyle==5.0.1
pydot==1.4.1
pyflakes==2.1.1
pygame==1.9.6
Pygments==2.6.1
PyHamcrest==2.0.2
pyLDAvis==2.1.2
pylint==2.4.4
Pympler==0.8
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pyparsing==2.4.6
PyPDF2==1.26.0
pypyodbc==1.3.4
PyQt5==5.12.3
PyQt5-sip==12.7.0
PyQtWebEngine==5.12.1
pyrsistent==0.16.0
PySocks==1.7.1
pyspark==2.4.5
pytesseract==0.3.2
python-dateutil==2.8.1
python-jsonrpc-server==0.3.4
python-language-server==0.31.9
pytz==2019.3
pywin32==227
pywin32-ctypes==0.2.0
pywinpty==0.5.7
PyYAML==5.3.1
pyzmq==18.1.1
QDarkStyle==2.8
QtAwesome==0.7.0
qtconsole==4.7.2
QtPy==1.9.0
queuelib==1.5.0
requests==2.23.0
requests-oauthlib==1.3.0
retrying==1.3.3
rope==0.16.0
rsa==4.0
Rtree==0.9.3
ruamel-yaml==0.15.87
s3transfer==0.3.3
scikit-learn==0.22.2.post1
scipy==1.1.0
Scrapy==1.8.0
seaborn==0.10.0
selenium==3.141.0
Send2Trash==1.5.0
service-identity==18.1.0
setuptools==46.1.3.post20200330
Shapely==1.7.0
simplified-scrapy==1.0.111
six==1.14.0
sklearn==0.0
smart-open==1.9.0
snowballstemmer==2.0.0
sortedcontainers==2.1.0
soupsieve==2.0
spacy==2.2.3
Sphinx==2.4.4
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
spyder==4.0.1
spyder-kernels==1.8.1
srsly==1.0.1
tabulate==0.8.6
TBB==0.1
tensorboard==2.0.2
tensorflow==2.0.0
tensorflow-datasets==2.0.0
tensorflow-estimator==2.0.1
tensorflow-hub==0.8.0
tensorflow-metadata==0.21.1
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
textblob==0.15.3
thinc==7.3.1
torch==1.4.0
tornado==6.0.4
tqdm==4.44.1
traitlets==4.3.3
Twisted==19.10.0
typed-ast==1.4.0
ujson==1.35
uritemplate==3.0.1
urllib3==1.25.8
urlopen==1.0.0
vaderSentiment==3.2.1
vega-datasets==0.8.0
w3lib==1.21.0
wasabi==0.6.0
watchdog==0.10.2
wcwidth==0.1.9
webdriver-manager==2.3.0
webencodings==0.5.1
Werkzeug==1.0.1
wheel==0.34.2
widgetsnbextension==3.5.1
win-inet-pton==1.1.0
wincertstore==0.2
wordcloud==1.6.0
wordnet==0.0.1b2
wrapt==1.12.1
xgboost==1.0.2
xlutils==2.0.0
xmltodict==0.12.0
yapf==0.29.0
yellowbrick==1.0.1
yfinance==0.1.54
zipp==2.2.0
zope.interface==4.7.1

``````

</details>

### Next steps

No action items identified. Please copy ALL of the above output,
including the lines containing only backticks, into your GitHub issue
or comment. Be sure to redact any sensitive information.

【问题讨论】:

    标签: python python-3.x tensorflow tensorflow2.0 tensorboard


    【解决方案1】:

    这主要是由于配置错误。试试这些 -

    如果你安装了 nightly 版本

    pip uninstall tb-nightly tensorboard tensorflow-estimator tensorflow-gpu tf-estimator-nightly
    
    pip install tensorflow  # or `tensorflow-gpu`, or `tf-nightly`, ...
    

    https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py下载了一个测试脚本

    看看你是否安装了多个版本的张量板

    import pkg_resources
    
    for entry_point in pkg_resources.iter_entry_points('tensorboard_plugins'):
        print(entry_point.dist)
    

    【讨论】:

    • 我更新了我原来的帖子。我已经安装了这些:tensorboard==2.0.2 & tensorflow==2.0.0
    猜你喜欢
    • 2019-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-22
    • 1970-01-01
    • 1970-01-01
    • 2016-06-15
    • 2017-02-15
    相关资源
    最近更新 更多