Git Product home page Git Product logo

Comments (3)

GreatNewHope avatar GreatNewHope commented on August 16, 2024 2

This code might serve as an example:

def load_data():
    # load the dataset (it's a normal numpy array, samples x features (features = channel x width x height))
    dataset = np.load("dataset.npy") 
    # load the targets (they must be one hot encoded; np.array([1,0]) rather than 1
    targets = np.load("targets.npy")
    # select training and validation / test
    x_train = src_dataset[:-1, :, :]
    y_train = targets[:-1, :, :]

    x_test = src_dataset[-1:, :, :]
    y_test = targets[-1:, : , :]

    y_train = np.reshape(y_train, (len(y_train), 1))
    y_test = np.reshape(y_test, (len(y_test), 1))

    return (x_train, y_train), (x_test, y_test)

Please correct me if something is wrong or it could lead to any errors

from cnn_finetune.

HwaiHo-0552 avatar HwaiHo-0552 commented on August 16, 2024

I also want to get the load_data() module.......
Thanks.

from cnn_finetune.

HwaiHo-0552 avatar HwaiHo-0552 commented on August 16, 2024

@margaro95 Could you share the source code that load my own dataset ? I am a fresher. Thank you very much.

from cnn_finetune.

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.