python 深度学习 解决遇到的报错问题

2023-11-03

目录

一、解决报错ModuleNotFoundError: No module named ‘tensorflow.examples

二、解决报错ModuleNotFoundError: No module named ‘tensorflow.contrib‘

三、安装onnx报错assert CMAKE, ‘Could not find “cmake“ executable!‘

四、ImportError: cannot import name 'builder' from 'google.protobuf.internal'

五、解决ModuleNotFoundError: No module named 'sklearn'

六、解决AttributeError: module ‘torch._C‘ has no attribute ‘_cuda_setDevice‘

七、解决ImportError: Missing optional dependency 'pytables'.  Use pip or conda to install pytables.

八、解决AttributeError: module ‘distutils’ has no attribute ‘version’.


一、解决报错ModuleNotFoundError: No module named ‘tensorflow.examples

注意:MNIST数据集下载完成后不要解压,直接放入mnist_data文件夹下读取即可。

问题:我在用tensorflow做mnist数据集案例,报错了。

原因:tensorflow中没有examples。
解决方法:(1)首先找到对应tensorflow的文件,我的是在D:\python3\Lib\site-packages\tensorflow(python的安装目录),进入tensorflow文件夹,发现没有examples文件夹。 

我们可以进入github下载:mirrors / tensorflow / tensorflow · GitCode

(2)下载完成后将\tensorflow-master\tensorflow\目录下的examples文件夹复制到本地tensorflow文件夹中,然后在重新运行代码即可。

(3)之后发现还是没能解决问题,发现examples中缺少tutorials文件夹。在官方的github中没发现这个文件,在其他博主那里下载到了该文件。

下载地址: 百度网盘 请输入提取码

提取码:cxy7

(4)但是依旧没有解决问题…
前面博主使用的应该是tf1.0的版本。参考其他博主的方法解决了问题。

  • 在工程下新建一个input_data.py文件,将tutorials文件夹下mnist中的input_data.py的内容复制到该文件中,
  • 再在主文件中import input_data一下。

input_data.py文件内容放在下面,需要的自取。

# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Functions for downloading and reading MNIST data (deprecated).

This module and all its submodules are deprecated.
"""

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

import collections
import gzip
import os

import numpy
from six.moves import urllib
from six.moves import xrange  # pylint: disable=redefined-builtin

from tensorflow.python.framework import dtypes
from tensorflow.python.framework import random_seed
from tensorflow.python.platform import gfile
from tensorflow.python.util.deprecation import deprecated

_Datasets = collections.namedtuple('_Datasets', ['train', 'validation', 'test'])

# CVDF mirror of http://yann.lecun.com/exdb/mnist/
DEFAULT_SOURCE_URL = 'https://storage.googleapis.com/cvdf-datasets/mnist/'


def _read32(bytestream):
  dt = numpy.dtype(numpy.uint32).newbyteorder('>')
  return numpy.frombuffer(bytestream.read(4), dtype=dt)[0]


@deprecated(None, 'Please use tf.data to implement this functionality.')
def _extract_images(f):
  """Extract the images into a 4D uint8 numpy array [index, y, x, depth].

  Args:
    f: A file object that can be passed into a gzip reader.

  Returns:
    data: A 4D uint8 numpy array [index, y, x, depth].

  Raises:
    ValueError: If the bytestream does not start with 2051.

  """
  print('Extracting', f.name)
  with gzip.GzipFile(fileobj=f) as bytestream:
    magic = _read32(bytestream)
    if magic != 2051:
      raise ValueError('Invalid magic number %d in MNIST image file: %s' %
                       (magic, f.name))
    num_images = _read32(bytestream)
    rows = _read32(bytestream)
    cols = _read32(bytestream)
    buf = bytestream.read(rows * cols * num_images)
    data = numpy.frombuffer(buf, dtype=numpy.uint8)
    data = data.reshape(num_images, rows, cols, 1)
    return data


@deprecated(None, 'Please use tf.one_hot on tensors.')
def _dense_to_one_hot(labels_dense, num_classes):
  """Convert class labels from scalars to one-hot vectors."""
  num_labels = labels_dense.shape[0]
  index_offset = numpy.arange(num_labels) * num_classes
  labels_one_hot = numpy.zeros((num_labels, num_classes))
  labels_one_hot.flat[index_offset + labels_dense.ravel()] = 1
  return labels_one_hot


@deprecated(None, 'Please use tf.data to implement this functionality.')
def _extract_labels(f, one_hot=False, num_classes=10):
  """Extract the labels into a 1D uint8 numpy array [index].

  Args:
    f: A file object that can be passed into a gzip reader.
    one_hot: Does one hot encoding for the result.
    num_classes: Number of classes for the one hot encoding.

  Returns:
    labels: a 1D uint8 numpy array.

  Raises:
    ValueError: If the bystream doesn't start with 2049.
  """
  print('Extracting', f.name)
  with gzip.GzipFile(fileobj=f) as bytestream:
    magic = _read32(bytestream)
    if magic != 2049:
      raise ValueError('Invalid magic number %d in MNIST label file: %s' %
                       (magic, f.name))
    num_items = _read32(bytestream)
    buf = bytestream.read(num_items)
    labels = numpy.frombuffer(buf, dtype=numpy.uint8)
    if one_hot:
      return _dense_to_one_hot(labels, num_classes)
    return labels


class _DataSet(object):
  """Container class for a _DataSet (deprecated).

  THIS CLASS IS DEPRECATED.
  """

  @deprecated(None, 'Please use alternatives such as official/mnist/_DataSet.py'
              ' from tensorflow/models.')
  def __init__(self,
               images,
               labels,
               fake_data=False,
               one_hot=False,
               dtype=dtypes.float32,
               reshape=True,
               seed=None):
    """Construct a _DataSet.

    one_hot arg is used only if fake_data is true.  `dtype` can be either
    `uint8` to leave the input as `[0, 255]`, or `float32` to rescale into
    `[0, 1]`.  Seed arg provides for convenient deterministic testing.

    Args:
      images: The images
      labels: The labels
      fake_data: Ignore inages and labels, use fake data.
      one_hot: Bool, return the labels as one hot vectors (if True) or ints (if
        False).
      dtype: Output image dtype. One of [uint8, float32]. `uint8` output has
        range [0,255]. float32 output has range [0,1].
      reshape: Bool. If True returned images are returned flattened to vectors.
      seed: The random seed to use.
    """
    seed1, seed2 = random_seed.get_seed(seed)
    # If op level seed is not set, use whatever graph level seed is returned
    numpy.random.seed(seed1 if seed is None else seed2)
    dtype = dtypes.as_dtype(dtype).base_dtype
    if dtype not in (dtypes.uint8, dtypes.float32):
      raise TypeError('Invalid image dtype %r, expected uint8 or float32' %
                      dtype)
    if fake_data:
      self._num_examples = 10000
      self.one_hot = one_hot
    else:
      assert images.shape[0] == labels.shape[0], (
          'images.shape: %s labels.shape: %s' % (images.shape, labels.shape))
      self._num_examples = images.shape[0]

      # Convert shape from [num examples, rows, columns, depth]
      # to [num examples, rows*columns] (assuming depth == 1)
      if reshape:
        assert images.shape[3] == 1
        images = images.reshape(images.shape[0],
                                images.shape[1] * images.shape[2])
      if dtype == dtypes.float32:
        # Convert from [0, 255] -> [0.0, 1.0].
        images = images.astype(numpy.float32)
        images = numpy.multiply(images, 1.0 / 255.0)
    self._images = images
    self._labels = labels
    self._epochs_completed = 0
    self._index_in_epoch = 0

  @property
  def images(self):
    return self._images

  @property
  def labels(self):
    return self._labels

  @property
  def num_examples(self):
    return self._num_examples

  @property
  def epochs_completed(self):
    return self._epochs_completed

  def next_batch(self, batch_size, fake_data=False, shuffle=True):
    """Return the next `batch_size` examples from this data set."""
    if fake_data:
      fake_image = [1] * 784
      if self.one_hot:
        fake_label = [1] + [0] * 9
      else:
        fake_label = 0
      return [fake_image for _ in xrange(batch_size)
             ], [fake_label for _ in xrange(batch_size)]
    start = self._index_in_epoch
    # Shuffle for the first epoch
    if self._epochs_completed == 0 and start == 0 and shuffle:
      perm0 = numpy.arange(self._num_examples)
      numpy.random.shuffle(perm0)
      self._images = self.images[perm0]
      self._labels = self.labels[perm0]
    # Go to the next epoch
    if start + batch_size > self._num_examples:
      # Finished epoch
      self._epochs_completed += 1
      # Get the rest examples in this epoch
      rest_num_examples = self._num_examples - start
      images_rest_part = self._images[start:self._num_examples]
      labels_rest_part = self._labels[start:self._num_examples]
      # Shuffle the data
      if shuffle:
        perm = numpy.arange(self._num_examples)
        numpy.random.shuffle(perm)
        self._images = self.images[perm]
        self._labels = self.labels[perm]
      # Start next epoch
      start = 0
      self._index_in_epoch = batch_size - rest_num_examples
      end = self._index_in_epoch
      images_new_part = self._images[start:end]
      labels_new_part = self._labels[start:end]
      return numpy.concatenate((images_rest_part, images_new_part),
                               axis=0), numpy.concatenate(
                                   (labels_rest_part, labels_new_part), axis=0)
    else:
      self._index_in_epoch += batch_size
      end = self._index_in_epoch
      return self._images[start:end], self._labels[start:end]


@deprecated(None, 'Please write your own downloading logic.')
def _maybe_download(filename, work_directory, source_url):
  """Download the data from source url, unless it's already here.

  Args:
      filename: string, name of the file in the directory.
      work_directory: string, path to working directory.
      source_url: url to download from if file doesn't exist.

  Returns:
      Path to resulting file.
  """
  if not gfile.Exists(work_directory):
    gfile.MakeDirs(work_directory)
  filepath = os.path.join(work_directory, filename)
  if not gfile.Exists(filepath):
    urllib.request.urlretrieve(source_url, filepath)
    with gfile.GFile(filepath) as f:
      size = f.size()
    print('Successfully downloaded', filename, size, 'bytes.')
  return filepath


@deprecated(None, 'Please use alternatives such as:'
            ' tensorflow_datasets.load(\'mnist\')')
def read_data_sets(train_dir,
                   fake_data=False,
                   one_hot=False,
                   dtype=dtypes.float32,
                   reshape=True,
                   validation_size=5000,
                   seed=None,
                   source_url=DEFAULT_SOURCE_URL):
  if fake_data:

    def fake():
      return _DataSet([], [],
                      fake_data=True,
                      one_hot=one_hot,
                      dtype=dtype,
                      seed=seed)

    train = fake()
    validation = fake()
    test = fake()
    return _Datasets(train=train, validation=validation, test=test)

  if not source_url:  # empty string check
    source_url = DEFAULT_SOURCE_URL

  train_images_file = 'train-images-idx3-ubyte.gz'
  train_labels_file = 'train-labels-idx1-ubyte.gz'
  test_images_file = 't10k-images-idx3-ubyte.gz'
  test_labels_file = 't10k-labels-idx1-ubyte.gz'

  local_file = _maybe_download(train_images_file, train_dir,
                               source_url + train_images_file)
  with gfile.Open(local_file, 'rb') as f:
    train_images = _extract_images(f)

  local_file = _maybe_download(train_labels_file, train_dir,
                               source_url + train_labels_file)
  with gfile.Open(local_file, 'rb') as f:
    train_labels = _extract_labels(f, one_hot=one_hot)

  local_file = _maybe_download(test_images_file, train_dir,
                               source_url + test_images_file)
  with gfile.Open(local_file, 'rb') as f:
    test_images = _extract_images(f)

  local_file = _maybe_download(test_labels_file, train_dir,
                               source_url + test_labels_file)
  with gfile.Open(local_file, 'rb') as f:
    test_labels = _extract_labels(f, one_hot=one_hot)

  if not 0 <= validation_size <= len(train_images):
    raise ValueError(
        'Validation size should be between 0 and {}. Received: {}.'.format(
            len(train_images), validation_size))

  validation_images = train_images[:validation_size]
  validation_labels = train_labels[:validation_size]
  train_images = train_images[validation_size:]
  train_labels = train_labels[validation_size:]

  options = dict(dtype=dtype, reshape=reshape, seed=seed)

  train = _DataSet(train_images, train_labels, **options)
  validation = _DataSet(validation_images, validation_labels, **options)
  test = _DataSet(test_images, test_labels, **options)

  return _Datasets(train=train, validation=validation, test=test)


二、解决报错ModuleNotFoundError: No module named ‘tensorflow.contrib‘

问题:在TensorFlow2.x版本已经不能使用contrib包

三、安装onnx报错assert CMAKE, ‘Could not find “cmake“ executable!‘

经过百度,查得:安装onnx需要protobuf编译所以安装前需要安装protobuf。

四、ImportError: cannot import name 'builder' from 'google.protobuf.internal'

问题:当运行torch转onnx的代码时,出现ImportError: cannot import name 'builder' from 'google.protobuf.internal',如下图:

原因:由于使用的google.protobuf版本太低而引起的。在较新的版本中,builder模块已经移动到了google.protobuf包中,而不再在google.protobuf.internal中。

解决办法:升级protobuf库

pip install --upgrade protobuf

五、解决ModuleNotFoundError: No module named 'sklearn'

问题:sklearn第三方库安装失败

原因:查看别人库的列表,发现sklearn的包名是scikit-learn

解决:安装scikit-learn,

pip install  -i https://pypi.tuna.tsinghua.edu.cn/simple scikit-learn

六、解决AttributeError: module ‘torch._C‘ has no attribute ‘_cuda_setDevice‘

网上查询原因:说我安装的torch是适合CPU的,而不是适合GPU的。于是我查询pytorch版本情况,代码如下,

import torch
torch.cuda.is_available()

结果是False。

显而易见,环境使用的是CPU版本的torch,但是我仔细检查了一下我安装的命令,如下

解决:下载三个安装包,适合GPU版本的,

可以参考这篇(1条消息) GPU版本安装Pytorch教程最新方法_pytorch gpu_水w的博客-CSDN博客

然后分别pip install 他们,这样就能够安装适合GPU版本的torch了。

七、解决ImportError: Missing optional dependency 'pytables'.  Use pip or conda to install pytables.

问题:运行py文件报错

解决历程:按照提示安装pytables,"pip install pytables"安装失败,然后试了"pip install tables"安装上了。

 重新运行代码,发现就不报错了。

八、解决AttributeError: module ‘distutils’ has no attribute ‘version’.

问题: AttributeError: module ‘distutils’ has no attribute ‘version’.

解决: setuptools版本问题”,版本过高导致的问题;setuptools版本

  • 第一步: pip uninstall setuptools【使用pip,不能使用 conda uninstall setuptools ; 【不能使用conda的命令,原因是,conda在卸载的时候,会自动分析与其相关的库,然后全部删除,如果y的话,整个环境都需要重新配置。
  • 第二步: pip或者conda install setuptools==59.5.0【现在最新的版本已经到了65了,之前的老版本只是部分保留,找不到的版本不行

然后重新运行了代码,发现没有报错了。

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

python 深度学习 解决遇到的报错问题 的相关文章

  • Python 中的哈希映射

    我想用Python实现HashMap 我想请求用户输入 根据他的输入 我从 HashMap 中检索一些信息 如果用户输入HashMap的某个键 我想检索相应的值 如何在 Python 中实现此功能 HashMap
  • 安装了 32 位的 Python,显示为 64 位

    我需要运行 32 位版本的 Python 我认为这就是我在我的机器上运行的 因为这是我下载的安装程序 当我重新运行安装程序时 它会将当前安装的 Python 版本称为 Python 3 5 32 位 然而当我跑步时platform arch
  • 将html数据解析成python列表进行操作

    我正在尝试读取 html 网站并提取其数据 例如 我想查看公司过去 5 年的 EPS 每股收益 基本上 我可以读入它 并且可以使用 BeautifulSoup 或 html2text 创建一个巨大的文本块 然后我想搜索该文件 我一直在使用
  • Python 中的舍入浮点问题

    我遇到了 np round np around 的问题 它没有正确舍入 我无法包含代码 因为当我手动设置值 而不是使用我的数据 时 返回有效 但这是输出 In 177 a Out 177 0 0099999998 In 178 np rou
  • Pandas/Google BigQuery:架构不匹配导致上传失败

    我的谷歌表中的架构如下所示 price datetime DATETIME symbol STRING bid open FLOAT bid high FLOAT bid low FLOAT bid close FLOAT ask open
  • Python getstatusoutput 替换不返回完整输出

    我发现了这个很棒的替代品getstatusoutput Python 2 中的函数在 Unix 和 Windows 上同样有效 不过我觉得这个方法有问题output被构建 它只返回输出的最后一行 但我不明白为什么 任何帮助都是极好的 def
  • 需要在python中找到print或printf的源代码[关闭]

    很难说出这里问的是什么 这个问题是含糊的 模糊的 不完整的 过于宽泛的或修辞性的 无法以目前的形式得到合理的回答 如需帮助澄清此问题以便重新打开 访问帮助中心 help reopen questions 我正在做一些我不能完全谈论的事情 我
  • 使用 Python 从文本中删除非英语单词

    我正在 python 上进行数据清理练习 我正在清理的文本包含我想删除的意大利语单词 我一直在网上搜索是否可以使用像 nltk 这样的工具包在 Python 上执行此操作 例如给出一些文本 Io andiamo to the beach w
  • Pandas 日期时间格式

    是否可以用零后缀表示 pd to datetime 似乎零被删除了 print pd to datetime 2000 07 26 14 21 00 00000 format Y m d H M S f 结果是 2000 07 26 14
  • 将 python2.7 与 Emacs 24.3 和 python-mode.el 一起使用

    我是 Emacs 新手 我正在尝试设置我的 python 环境 到目前为止 我已经了解到在 python 缓冲区中使用 python mode el C c C c将当前缓冲区的内容加载到交互式 python shell 中 显然使用了什么
  • 使用字典映射数据帧索引

    为什么不df index map dict 工作就像df column name map dict 这是尝试使用index map的一个小例子 import pandas as pd df pd DataFrame one A 10 B 2
  • YOLOv8获取预测边界框

    我想将 OpenCV 与 YOLOv8 集成ultralytics 所以我想从模型预测中获取边界框坐标 我该怎么做呢 from ultralytics import YOLO import cv2 model YOLO yolov8n pt
  • “隐藏”内置类对象、函数、代码等的名称和性质[关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 我很好奇模块中存在的类builtins无法直接访问的 例如 type lambda 0 name function of module
  • Docker 中的 Python 日志记录

    我正在 Ubuntu Web 服务器上的 Docker 容器中测试运行 python 脚本 我正在尝试查找由 Python Logger 模块生成的日志文件 下面是我的Python脚本 import time import logging
  • pyspark 将 twitter json 流式传输到 DF

    我正在从事集成工作spark streaming with twitter using pythonAPI 我看到的大多数示例或代码片段和博客是他们从Twitter JSON文件进行最终处理 但根据我的用例 我需要所有字段twitter J
  • javascript 是否有等效的 __repr__ ?

    我最接近Python的东西repr这是 function User name password this name name this password password User prototype toString function r
  • pip 列出活动 virtualenv 中的全局包

    将 pip 从 1 4 x 升级到 1 5 后pip freeze输出我的全局安装 系统 软件包的列表 而不是我的 virtualenv 中安装的软件包的列表 我尝试再次降级到 1 4 但这并不能解决我的问题 这有点类似于这个问题 http
  • 如何在 pygtk 中创建新信号

    我创建了一个 python 对象 但我想在它上面发送信号 我让它继承自 gobject GObject 但似乎没有任何方法可以在我的对象上创建新信号 您还可以在类定义中定义信号 class MyGObjectClass gobject GO
  • cv2.VideoWriter:请求一个元组作为 Size 参数,然后拒绝它

    我正在使用 OpenCV 4 0 和 Python 3 7 创建延时视频 构造 VideoWriter 对象时 文档表示 Size 参数应该是一个元组 当我给它一个元组时 它拒绝它 当我尝试用其他东西替换它时 它不会接受它 因为它说参数不是
  • 使用随机放置的 NaN 创建示例 numpy 数组

    出于测试目的 我想创建一个M by Nnumpy 数组与c随机放置的 NaN import numpy as np M 10 N 5 c 15 A np random randn M N A mask np nan 我在创建时遇到问题mas

随机推荐

  • 灰色关联分析法

    与灰色预测模型一样 比赛不能优先使用 灰色关联往往可以与层次分析结合使用 层次分析用在确定权重上面 1 确定比较对象 评价对象 就是数据 并且需要进行规范化处理 就是标准化处理 见下面例题的表格数据 和参考数列 评价标准 一般该列数列都是1
  • windows下能搭建php-fpm吗 phpstudy

    这个Windows和Linux系统是不一样的 因为一般nginx搭配php需要php fpm中间件 但是Windows下需要第三方编译 下载的包里有php cgi exe 但不是php fpm如果想在windows上跑php fpm 据说可
  • 【ES】分布式集群

    ES 分布式集群 单节点集群 故障转移 水平扩容 应对故障 路由计算 本文主要参考尚硅谷的资料 少部分自己原创 有错误之处请指出 单节点集群 node 1001配置如下 集群名称 节点之间要保持一致 cluster name my elas
  • C++ PCL库实现最远点采样算法

    最远点采样 Farthest Point Sampling 简称FPS 是点云处理领域中的一种重要算法 用于对点云数据进行快速降采样 最早的最远点采样算法应该是在计算机图形学领域中提出的 用于在三维模型上进行表面重建 随着点云处理技术的发展
  • HDU--1200:To and Fro (字符串)

    1 题目源地址 http acm hdu edu cn showproblem php pid 1200 2 解题代码 include
  • 服务器远程使用什么协议,云服务器远程是什么协议

    云服务器远程是什么协议 内容精选 换一换 弹性云服务器 Elastic Cloud Server 是一种可随时自动获取 计算能力可弹性伸缩的云服务器 可帮助您打造可靠 安全 灵活 高效的应用环境 确保服务持久稳定运行 提升运维效率 WinS
  • Jira 史诗指南 (2022)

    Jira 就是为了完成工作 而 Epics 是实现该目标的一种有价值的方式 一般来说 Epics 适用于顾名思义 不会在一天内完成但会 的工作 史诗 在本指南中 我们将分解什么是 Epics 它们的用途 以及它们的用途 以及如何创建和使用它
  • Qt 应用程序显示页面的方法

    1 在qt窗口中显示页面 1 pro中添加 QT webkitwidgets 2 添加头文件 include
  • Swift4.0 guard,Array,Dictionary

    guard的使用 guard是Swift新增语法 guard语句必须带有else语句当条件表达式为true时候跳过else语句中的内容 执行语句组内容 条件表达式为false时候执行else语句中的内容 跳转语句一般是return brea
  • Web服务器群集:Nginx网页及安全优化

    目录 一 理论 1 Nginx网页优化 2 Nginx安全优化 3 Nginx日志分割 二 实验 1 网页压缩 2 网页缓存 3 连接超时设置 4 并发设置 5 隐藏版本信息 6 脚本实现每月1号进行日志分割 7 防盗链 三 总结 一 理论
  • 上海交大ACM班C++算法与数据结构——数据结构之栈

    上海交大ACM班C 算法与数据结构 数据结构之栈 1 栈的定义 后进先出LIFO first in last out 先进后出FILO first in last out 的线性表 有关线性表可查看 上海交大ACM班C 算法与数据结构 数据
  • HTML ,CSS ,JS 组合运用制作登录界面,注册界面,相册旋转展示界面,并相互跳转联系,源代码

    完成 个人相册 项目登录页面 要求 1 使用正则表达式验证邮箱 2 密码长度至少为6位且为字母与数字的组合 可自行改变背景图片 此时所用图片与项目在同一目录下 只需写入文件名 图片要在与项目同级目录下 要写入路径及名称 登录界面所有代码如下
  • PHP学习之路——基本语法

    phpinfo是一个函数 功能 这个函数 功能 会显示一个当前电脑 服务器 的详细的PHP信息 我们写完一段代码 就需要在后面加分号 php的代码部份全部要用半角的英文 很多人容易写成全角的英文和符号造成PHP代码报错 PHP中的变量也是如
  • CPU乱序执行

    CPU乱序执行 CPU乱序执行是什么 例程 参考 总结 CPU乱序执行是什么 我们理解的程序是顺序执行的 其实是指在单个独立的进程中表现得像顺序运行的 而多处理器多线程共享内存系统是十分复杂的 需要约束这些复杂系统的行为 我们将程序线程共享
  • mavon-editor 使用及如何将html的数据转为markdown的数据问题

    1 安装mavon editor cnpm install mavon editor s 2 页面使用
  • Python通过smtplib发送邮件

    Python通过smtplib发送邮件 1 邮件发送的步骤 2 邮箱设置 3 发送一封qq邮件 4 发送HTML格式的邮件 5 发送带附件的邮件 6 在HTML文本中添加图片 7 python给同一个人发送多封邮件 8 python给不同的
  • 5.6.2_IEEE754

    文章目录 一 引子 二 移码 1 移码与补码 2 移码本身 1 127 2 3 3 偏置值 普通情况 特殊情况 三 IEEE 754标准 1 格式 2 类型 1 短浮点数 2 double型 3 案例 1 案例一 2 案例二 4 范围 1
  • unity下多层随机迷宫构建

    using System Collections using System Collections Generic using UnityEngine public class Maze MonoBehaviour public GameO
  • 【Android入门到项目实战-- 11.4】—— ExoPlayer视频播放器框架的详细使用

    目录 什么是ExoPlayer 一 基本使用 1 添加依赖项 2 布局 3 Activity 二 自定义播放暂停 1 首先如何隐藏默认的开始暂停和快进 2 自定义 三 控制视频画面旋转和比例调整 四 全屏放大和缩小 1 双击视频放大缩小 2
  • python 深度学习 解决遇到的报错问题

    目录 一 解决报错ModuleNotFoundError No module named tensorflow examples 二 解决报错ModuleNotFoundError No module named tensorflow co