• tensorflow入门MNIST遇到的问题


    解压.gz数据集文件时提示:TypeError: only integer scalar arrays can be converted to a scalar index

    查阅资料后原创博主: https://blog.csdn.net/qq_29750461/article/details/82732469

    原因在于 _read32(bytestream)这个函数

    def _read32(bytestream):
    #采用大尾端存储
    dt = numpy.dtype(numpy.uint32).newbyteorder('>')
    return numpy.frombuffer(bytestream.read(4), dtype=dt)[
    改为即可:
    def _read32(bytestream):
    #采用大尾端存储
    dt = numpy.dtype(numpy.uint32).newbyteorder('>')
    return numpy.frombuffer(bytestream.read(4), dtype=dt)[0]
     
  • 相关阅读:
    数据窗口的缓冲区
    RowsMove()
    update
    defparameter defconstant
    1+ 1
    原则
    incf decf
    eql equal
    上司找谈话
    判断回文的函数palindrome?
  • 原文地址:https://www.cnblogs.com/LuffysMan/p/9783613.html
Copyright © 2020-2023  润新知