Deep Learning Brasília - Lição 1

Se tiro fotos e transfiro para o meu PC, como carrego para a pasta do Jupyter para poder rodar o image classifier nelas?

É uma pergunta muito básica: como carrego arquivos (imagens), que estão em pasta local no computador, para uma pasta virtual que o Jupyter utiliza? A propósito, ainda estou usando Crestle, mas estou tentando configurar Paperspace também.

Bom dia @vicohart,

uma opção é usar o comando Unix scp num Terminal.
@lucasosouza, o que pensa disso ?

Alguns recursos :
https://www.tecmint.com/scp-commands-examples/
http://www.ccp4.ac.uk/ronan/guide-sge3/node66.html

1 Like

Pessoal,

se quiser usar “Collapsable / expandable jupyter cells” em seus jupyter notebooks como os do @jeremy, instale a extensão ‘collapsible headings’ : https://github.com/ipython-contrib/jupyter_contrib_nbextensions

Passo-a-passo num Terminal :

  1. Download : pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
  2. Install : jupyter contrib nbextension install --user
  3. Enable : jupyter nbextension enable collapsible_headings/main

That’s it ! :slight_smile: Pode rodar o seu jupyter notebook agora :slight_smile:

2 Likes

Verifique a sua compreensão da lição 1

Verifique a sua compreensão da lição 2 >>>

Oi pessoal,

Eu assisti novamente ao video da lição 1 (parte 1) para melhorar meu entendimento dela e tomei notas do vocabulário usado pelo @jeremy.

Vamos jogar um pouquinho ! Concorda ? :wink:
Você pode dar uma definição / uma URL / uma explicação para todos os termos e expressões a seguir?

Se sim, você entendeu perfeitamente a primeira lição! :sunglasses::sunglasses::sunglasses:

PS: se você não quiser se testar ou se quiser checar as suas respostas, vá para o post “Deep Learning 2: Part 1 Lesson 1” do blog de @hiromi : " super travail !!! :slight_smile: "

  • course Fastai
  • forum Fastai
  • GPU
  • CUDA
  • NVIDIA
  • Crestle / PaperSpace
  • jupyter notebook
  • Data Science
  • SHIFT + ENTER in a jupyter notebook
  • python 3
  • wget
  • exclamation mark in a cell (ex : !ls)
  • bash command
  • python variable into brackets
  • training set
  • validation set
  • Fastai Machine Learning course : prerequesite or not ?
  • image Classifier
  • label
  • keras
  • plt.imread
  • plt.imshow
  • python 3.6 format string
  • img.shape
  • 3 dimensional array (rank 3 tensor)
  • Red Green Blue (RGB) pixel values between 0 and 255
  • kaggal competition
  • pre-trained model
  • resnet24
  • ImageNet competition
  • Convolucional Neural Network (CNN)
  • accuracy
  • train a model
  • 3 lines of code
  • epoch
  • testing set
  • learning rate
  • loss function
  • cross entropy loss
  • validation and testing set accuracy
  • Fastai library
  • transfer learning
  • pytorch
  • tensorflow
  • network architecture
  • data augmentation
  • validation set dependent variable val_y
  • data.classes
  • classes
  • object data
  • object learn
  • the model
  • prediction on validation set
  • learn.predict()
  • log of the predictions : log_preds
  • get the predictions on validation set np.argmax(log_preds, axis=1)
  • get probabilities on dogs : np.exp(log_preds[:,1])
  • numpy
  • top-down, the whole game
  • code driven approach
  • world class neural network
  • stalelite images
  • structured data
  • NLP classifier
  • recommendation system
  • text generator
  • create our own architecture from scratch
  • donwload a pre-trained model and precompute
  • alphago
  • image classifier for fraude dectection
  • machine learning
  • Arthur Samuels, 1950s, ML father
  • IBM mainframe
  • play checkers
  • traditional Machine Learning
  • features engineering
  • domaine experts and specialits
  • algorithm (Deep Learning) :
    ** infinitely flexible function
    ** all-purpose parameters fitting
    ** fast and scalable
  • neural network, number of simple linear layers interspersed with a number of non linear layers
  • universal approximation theorem
  • Fit parameters, Gradient Descent (how good are they, find a minimum on loss function curve, local miminim)
  • minimum time, GPU 10 time faster than a CPU
  • hidden layer
  • increase of number of parameters by layer is a problem but increase number of layers is teh solution
  • DL = neural network with multiple hidden layers
  • Google starts using DL in 2012
  • Geoffrey Hinton, DL father
  • Andrej Karpathy
  • inBox by Gmail
  • Skype Translator
  • Semantic Style Transfer
  • cancer detection
  • true/false positive/negative
  • CNN, Convolucional Neural Network
  • convolucional
  • find edges
  • multiplication of pixels values by a kernel (filter)
  • linear operation
  • linear layer
  • non linear layer
  • sigmoid
  • Relu
  • element wise multiplication
  • michael Neslon
  • Stochastic Gradient Descent
  • derivative
  • small step
  • learning rate
  • combine convolution, non linearity, gradient descent
  • picture of what each layer learns
  • parameters of the kernels are learnt using gradient descent
  • learn.fit()
  • learning rate not too high, but not too low as well
  • choosing a learning rate
  • learn.lr_find()
  • best improvement of the loss before it gets worse
  • learn.shed.plot_lr()
  • learn.sched.plot()
  • mini batches
  • traing loss
  • validation loss
  • validation accuracy
  • overfitting : stop fitting your model
  • tab to get list of function
  • SHIFT + TAB (once : parameters, twice : documentation, 3 times : pops up a window with source code)
  • 1 question mark : documentation
  • 2 question mark : pops up source code
  • H to get short codes in jupyter notebooks
  • Stop your Crestle or PaperSpace machine !
  • use the fastai forum !

from @nirantk : https://twitter.com/NirantK/status/984285662059917312

A curated list of tips and tricks to Make the Best of Project Jupyter for ML: https://github.com/NirantK/best-of-jupyter

  • debugging power tips: using the inbuilt debugger
  • searchmagic for searching across notebooks
  • improved the plotting utils which from @fastdotai for vision

Um link encontrado pelo @victorm : Wiki thread: Intro workshop

  • Windows setup
  • Mac setup
  • Initial AWS setup
  • Initial Paperspace setup
  • Initial Crestle setup
  • Using the terminal
  • Anaconda on laptop
  • Pros and cons: Crestle, AWS, Paperspace, laptop, workstation
  • Introduction to Jupyter notebooks
  • Introduction to numeric programming in Python
  • ssh into Paperspace
  • ssh into AWS
  • Machine Learning Foundations

Get the prediction on a specific image after training

Links :

Code (fn is the file name of the image) :

trn_tfms,val_tfms = tfms_from_model(arch, sz, aug_tfms=transforms_side_on, max_zoom=1.1)
img = open_image(PATH+fn)
im = val_tfms(img)
pred = learn.predict_array(im[None])
result = np.argmax(preds, axis=0)
print(f'The class is : {data.classes[result[0]]}')
plt.imshow(img)
1 Like