Skip to content

Instantly share code, notes, and snippets.

View ibrahim85's full-sized avatar
🏠
Working from home

ibrahim gad ibrahim85

🏠
Working from home
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ibrahim85
ibrahim85 / classifier_from_little_data_script_3.py
Created January 18, 2019 11:35 — forked from fchollet/classifier_from_little_data_script_3.py
Fine-tuning a Keras model. Updated to the Keras 2.0 API.
'''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
@ibrahim85
ibrahim85 / keras.py
Created July 18, 2017 11:41 — forked from hnykda/keras.py
Tada's usage (see discussion)
""" From: http://danielhnyk.cz/predicting-sequences-vectors-keras-using-rnn-lstm/ """
from keras.models import Sequential
from keras.layers.core import TimeDistributedDense, Activation, Dropout
from keras.layers.recurrent import GRU
import numpy as np
def _load_data(data, steps = 40):
docX, docY = [], []
for i in range(0, data.shape[0]/steps-1):
docX.append(data[i*steps:(i+1)*steps,:])
@ibrahim85
ibrahim85 / keras_prediction.py
Created July 18, 2017 11:41 — forked from Nemitek/keras_prediction.py
Predicting sequences of vectors (regression) in Keras using RNN - LSTM (original by danielhnyk.cz) - fixed for Keras 0.2.0
import pandas as pd
from random import random
flow = (list(range(1,10,1)) + list(range(10,1,-1)))*1000
pdata = pd.DataFrame({"a":flow, "b":flow})
pdata.b = pdata.b.shift(9)
data = pdata.iloc[10:] * random() # some noise
import numpy as np
@ibrahim85
ibrahim85 / anaconda-tensorflow-keras.txt
Created July 11, 2017 13:29 — forked from jeffg-dev/anaconda-tensorflow-keras.txt
Anaconda Keras / TensorFlow environment setup
Install TensorFlow (CPU), Keras, and some other tools to a new anaconda environment.
Open Anaconda Prompt
conda create --name tensorflow35 python=3.5
conda activate tensorflow35
conda install jupyter
conda install scipy
conda install spyder
pip install tensorflow