Coder Social home page Coder Social logo

ldl's Issues

Error executing c16e 2

when executing the code c16e2 i get the following error

TypeError: int() argument must be a string, a bytes-like object or a number, not 'tuple'

Missing softmax layer

In c5e2_mnist_learning_conf5 notebook for PyTorch, it's missing softmax layer. There is ReLU layer but missing softmax layer.

Thanks!

Pickle

I can't find or use pickle.Gzip and don't know this, quite a beginner

three calls to MNIST

However, the code snippet below contains three calls to MNIST. The reason for that is that we want to first access the training dataset to compute the mean and standard deviation.

trainset = MNIST(root='./pt_data', train=True, download=True, transform=transform)

But why the second call defining trainset? You already loaded trainset once to define mean and stdev. Why call it a second time?

Skip Unicode BOM when opening txt files.

Hi, the examples that use text files with Byte Order Marker (BOM), like frankenstein.txt, should use encoding='utf-8-sig' instead of utf-8 to skip the BOM, otherwise you get this:

In [4]: with open('frankenstein.txt', 'r', encoding='utf-8') as f:
   ...:     text = text_to_word_sequence(f.read())
   ...: print(text[0:5])

['\ufeffthe', 'project', 'gutenberg', 'ebook', 'of']

I realize it doesn't matter much, but it was confusing to see that word in there. One more note, np.int is deprecated.

Great book, thanks!

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.