This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INICIANDO TENSORFLOW DENTRO DE DOCKER | |
1ra alterinativa> si quiero solo abrir un container "efimero" uso --rm, haciendo uso de volumenes para grabar mantener mis libros jupyter: | |
sudo docker run --rm -it -p 8888:8888 -v /home/dante/Documents/tensorFlow:/notebooks/huequito tensorflow/tensorflow:1.1.0-rc2-py3 | |
--------------------- | |
2da alternativa> si quiero instalar dependencias de una imagen q inicialize, hare uso de BASH para que me aparezca la linea de comandas e instale lo q necesite. | |
Primero hago RUN: | |
sudo docker run --rm -it -p 8888:8888 -v /home/dante/Documents/tensorFlow:/notebooks/huequito tensorflow/tensorflow:1.1.0-rc2-py3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Flask Serving | |
This file is a sample flask app that can be used to test your model with an API. | |
This app does the following: | |
- Handles uploads and looks for an image file send as "file" parameter | |
- Stores the image at ./images dir | |
- Invokes ffwd_to_img function from evaluate.py with this image | |
- Returns the output file generated at /output | |
Additional configuration: | |
- You can also choose the checkpoint file name to use as a request parameter | |
- Parameter name: checkpoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
texto: '', | |
saludo: '', | |
cambio: '' | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INMUTABLE alternative: | |
array.concat crea un nuevo array, pero adiciona nuevos elementos en el nuevo array | |
array.slice crea copia de un array, | |
object.assign crea copia de obj en el q pueda modificar o agregar elementos en el nuevo objeto | |
en ES6 salio la nueva alternativa SPREAD OPERATOR que afecta tanto a arrays como objects, q hace lo mismo | |
con esto podria usar "shouldComponentUpdate" para mi JSX!! | |
https://developmentarc.gitbooks.io/react-indepth/content/life_cycle/update/using_should_component_update.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Ya no usaremos "pyenv", tampoco "pyenv-virtualenv" para crear versiones de Python, porque es mala practica | |
//en cambio usaremos solo la libreria "virtualenv": https://virtualenv.pypa.io/en/stable/ | |
//en la que por cada proyecto se tendra una version especifica de python | |
Por ej: | |
paa el proyecto "Gitchain" se inicia el virtualenv con: source .env/bin/activate | |
y para cerrar el virtualenv se usa: deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desde ahora usaremos solo virtualenv, (nunca mas pyenv) | |
1. brew install python3 (will install latest python and pip3 versions) | |
2. pip3 install virtualenv | |
//siguiendo este tutorial: | |
//https://help.dreamhost.com/hc/en-us/articles/115000695551-Installing-and-using-Python-s-virtualenv-using-Python-3 | |
3. revisas que versiones de python tienes instaladas en tu pc con: | |
"python" + TAB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Followed this: https://www.pyimagesearch.com/2016/11/14/installing-keras-with-tensorflow-backend/ | |
(lo hice para Python2.7) | |
1.Create a virtualEnv and open it | |
2. Once is inside, in the console, write this command: export TF_BINARY_URL= (look in Tensorflow WEB the URL: https://www.tensorflow.org/install/pip y buscar sección "Package Location" y "macOS (CPU-only)" ) | |
I used for my MAC: "export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py2-none-any.whl | |
3. pip install --upgrade $TF_BINARY_URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
OlderNewer