Learn practical skills, build real-world projects, and advance your career
!pip install jovian --upgrade --quiet
project_name = 'fruitsfinal'
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load

import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory

import os
for dirname, _, filenames in os.walk('/kaggle/input'):
    for filename in filenames:
        print(os.path.join(dirname, filename))

# You can write up to 5GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using "Save & Run All" 
# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session
import torch
import os
import jovian
import torchvision
import numpy as np
import matplotlib.pyplot as plt
import torch.nn as nn
import torchvision.models as models
import torch.nn.functional as F
from torchvision.datasets import ImageFolder
from torchvision.transforms import ToTensor
from torchvision.utils import make_grid
from torch.utils.data.dataloader import DataLoader
from torch.utils.data import random_split
#from torchvision.datasets import CIFAR10
import torchvision.models as models
%matplotlib inline
# Import dataset
data_dir = '../input/fruits/fruits-360'
print('Folders :', os.listdir(data_dir))
types = os.listdir(data_dir + "/Training")
print(len(types), ' types of fruits: ', types)
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-6-f1bc4cf839ac> in <module> 1 # Import dataset 2 data_dir = '../input/fruits/fruits-360' ----> 3 print('Folders :', os.listdir(data_dir)) 4 types = os.listdir(data_dir + "/Training") 5 print(len(types), ' types of fruits: ', types) FileNotFoundError: [Errno 2] No such file or directory: '../input/fruits/fruits-360'