Coder Social home page Coder Social logo

stl10's People

Contributors

mttk avatar pnaszarkowski avatar robinka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

stl10's Issues

Why (0,3,2,1) for transpose and not (0,2,3,1)?

I was looking at https://github.com/mttk/STL10/blob/master/stl10_input.py#L60:

images = np.transpose(images, (0, 3, 2, 1))

is there a reason that you have (0, 3, 2, 1) and not something else?

I noticed that if you change it to (0, 2, 3, 1) the images get flipped. Does it mean that the first 96 that appears from images = np.reshape(everything, (-1, 3, 96, 96)) corresponds to the HEIGHT but the second 96 corresponds to WIDTH? When you transpose it since the 3 goes before the 2 in (0, 3, 2, 1) it made me assume that since the 2 stayed in the same position that it was the height pixel index.

"img" directory not found

There is an error when we run the code with python 3.6.x. It says there is directory not found which needs us to create the 'img' folder in the current working directory.
I think there is os.mkdir('.\img') needed.

Code to get classname folder instead of numbers

Thank you for this script.

If you want to create class subfolders based on class names instead of numbers insert this snippet before the save_images(images, labels) call:

with open('data/stl10_binary/class_names.txt', 'r') as f:
	names = f.read().splitlines()
i2c = {i+1:names[i] for i in range(len(names))}
labels = [i2c[i] for i in labels]

AttributeError: module 'urllib' has no attribute 'urlretrieve'

I tried running the demo but I found the following error:

(venv2) brandomiranda~/Documents/MIT/MEng/hbf_tensorflow_code/tf_tutorials/stl10 $ frameworkpython stl10_input.py
<module 'urllib' from '/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/__init__.py'>
Traceback (most recent call last):
  File "stl10_input.py", line 114, in <module>
    download_and_extract()
  File "stl10_input.py", line 108, in download_and_extract
    filepath, _ = urllib.urlretrieve(DATA_URL, filepath, reporthook=_progress)
AttributeError: module 'urllib' has no attribute 'urlretrieve'

did you ever find an error like this before?

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.