Giter Club home page Giter Club logo

Comments (4)

pritesh2000 avatar pritesh2000 commented on July 22, 2024

you can use ``` (a sign before "1" thrice) to open and close code snippet

print("hello world")

from pytorch-deep-learning.

pritesh2000 avatar pritesh2000 commented on July 22, 2024

mention how you created transforms and dataloaders.

from pytorch-deep-learning.

nickawesome07 avatar nickawesome07 commented on July 22, 2024

1. Load and transform data

from torchvision import datasets
train_data_simple = datasets.ImageFolder(root=train_dir,
transform=simple_transform)
test_data_simple = datasets.ImageFolder(root=test_dir,
transform=simple_transform)

2. Turn the datasets into dataloaders

import os
from torch.utils.data import DataLoader

setup batchsize and num of workers

BATCH_SIZE = 32
NUM_WORKERS = os.cpu_count()

Create DataLoaders

train_dataloader_simple = DataLoader(dataset=train_data_simple,
batch_size=BATCH_SIZE,
shuffle=True,
num_workers=NUM_WORKERS)
test_dataloader_simple = DataLoader(dataset=test_data_simple,
shuffle=False,
num_workers=NUM_WORKERS)

from pytorch-deep-learning.

pritesh2000 avatar pritesh2000 commented on July 22, 2024

I don't think you have made any error in what code you had sent,
I tried to copy your code but it is all massy , can you provide link to your code(colab link like) or link .ipynb file here

from pytorch-deep-learning.

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.