Giter Club home page Giter Club logo

ki's People

Contributors

mof2 avatar oduerr avatar sichrist avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ki's Issues

Loading of EMNIST not working

Currently in the Excercise 6 is not working, we cannot load the data

Thanks to Reyhan Karamahmut we have the following workaround:

Download the data

wget --no-check-certificate https://rds.westernsydney.edu.au/Institutes/MARCS/BENS/EMNIST/emnist-matlab.zip
unzip emnist-matlab.zip
from scipy.io import loadmat

def load_emnist_data():
    # Source: Stack Overflow
    # Pfad zur entpackten Datei
    data_dir = "matlab/"
    mat_file_path = os.path.join(data_dir, 'emnist-balanced.mat')

    # Laden der .mat-Datei
    mat = loadmat(mat_file_path)

    # Extrahieren der Trainings- und Testdaten
    input_train = mat['dataset']['train'][0, 0]['images'][0, 0]
    target_train = mat['dataset']['train'][0, 0]['labels'][0, 0].flatten()
    input_test = mat['dataset']['test'][0, 0]['images'][0, 0]
    target_test = mat['dataset']['test'][0, 0]['labels'][0, 0].flatten()

    # Transformation der Daten
    input_train = input_train.reshape((input_train.shape[0], 28, 28), order="F")
    input_test = input_test.reshape((input_test.shape[0], 28, 28), order="F")

    return (input_train, target_train), (input_test, target_test)

(input_train, target_train), (input_test, target_test) = load_emnist_data()

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.