Coder Social home page Coder Social logo

Comments (3)

machrisaa avatar machrisaa commented on July 18, 2024

Copied from documentation of Numpy:

encoding : str, optional
What encoding to use when reading Python 2 strings. Only useful when loading Python 2 generated pickled files on Python 3, which includes npy/npz files containing object arrays. Values other than ‘latin1’, ‘ASCII’, and ‘bytes’ are not allowed, as they can corrupt numerical data. Default: ‘ASCII’

So I will suggest you remove the encoding parameter for Python 3.

from tensorflow-vgg.

jiankang1991 avatar jiankang1991 commented on July 18, 2024

Thank you. I tried, but it comes out the following error:

  File "<ipython-input-1-686846baf3f3>", line 1, in <module>
    runfile('/home/kang/Documents/work_code_PC1/tensorflow-vgg/test_vgg16.py', wdir='/home/kang/Documents/work_code_PC1/tensorflow-vgg')

  File "/usr/lib/python3/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 685, in runfile
    execfile(filename, namespace)

  File "/usr/lib/python3/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 85, in execfile
    exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)

  File "/home/kang/Documents/work_code_PC1/tensorflow-vgg/test_vgg16.py", line 20, in <module>
    vgg = vgg16.Vgg16()

  File "/home/kang/Documents/work_code_PC1/tensorflow-vgg/vgg16.py", line 20, in __init__
    self.data_dict = np.load(vgg16_npy_path).item()

  File "/usr/lib/python3/dist-packages/numpy/lib/npyio.py", line 394, in load
    return format.read_array(fid)

  File "/usr/lib/python3/dist-packages/numpy/lib/format.py", line 446, in read_array
    array = pickle.load(fp)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 0: ordinal not in range(128)

from tensorflow-vgg.

machrisaa avatar machrisaa commented on July 18, 2024

This issue should be fixed in the recent update on the python3 compatibility.

from tensorflow-vgg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.