Learning-Notes
Learning-Notes copied to clipboard
💡 Repo of learning notes in DRL and DL, theory, codes, models and notes maybe.
Learning Notes of DRL & DL
A repo of Learning notes of DRL & DL, theory, codes, models and notes maybe.
Content
Notes
Deep Learning Basic
- LinearRegression
- LogisticRegression
- RegressionTree
- Support Vector Machine
- NeuralNetwork
Natural Language Processing
- Word2Vec
- GloVe
Deep Reinforcement Learning
- PolicyGradient
- DQN
- DoubleDQN
- PPO
- A3C / DPPO
Deep Learning Engineering
- TensorFlow Serving
Docker
- Docker Notes
Codes
- Artifical Neuron Network (ANN)
Requirements
- numpy
- scipy
- sklearn
- matplotlib
- tensorflow==1.8
Instructions for codes
Artifical Neuron Network (ANN)
- Load your data, for example, iris data set.
from sklearn.datasets import load_iris
iris = load_iris()
- Standardize your data.
scaler = StandardScaler()
scaler.fit(iris.data)
x_data = scaler.transform(iris.data)
y_data = np.zeros((150, 3))
y_data[np.arange(150), iris.target] = 1
- Initialize activations, which are configurable.
activation_funcs = [function.relu] * 1
# activation_funcs = [function.tanh] * 1
# activation_funcs = [function.sigmoid] * 1
activation_funcs.append(function.linear)
- Initialize model, option parameters are configurable.
dense = Dense(x_space=4, y_space=3, neuron_count_list=[10], **{
"loss_func": function.softmax_cross_entropy,
"activation_funcs": activation_funcs,
"learning_rate": 0.01,
"enable_logger": True,
"model_name": 'iris',
"batch_size": 30,
'model': 'train'
)
- Train or Restore & Evaluate.
dense.train(x_data, y_data)
# dense.restore()
dense.evaluate(x_data, y_data)