-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathNo.py
57 lines (57 loc) · 1.67 KB
/
No.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Inflow-Prediction-Bhakra
Inflow determination of Bhakra Reservoir using Long Short-Term Memory network
# System Requirements
```bash
python 3.6+
tensorflow-gpu
keras
pandas
numpy
matplotlib
sklearn
```
# How to run
Install anaconda from [this](http://anaconda.org) on your pc and run following commands
```bash
conda create --name tf-gpu
conda activate tf-gpu
conda install -c aaronzs tensorflow-gpu
conda install -c anaconda cudatoolkit
conda install -c anaconda cudnn
conda install keras-gpu
pip install pandas
pip install sklearn
pip install matplotlib
```
Then run to download the git repository
```bash
git clone https://github.com/Anurag14/Inflow-Prediction-Bhakra
cd Inflow-Prediction-Bhakra
```
# To auto generate model graphs
download graphviz2.38 from [here](https://graphviz.gitlab.io/) then add its executable to $PATH variable.
```python
import os
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'
```
or run following if above doesn't seem to work
```bash
pip install pydot_ng
conda install graphviz
```
#### TL;DR install graphviz via conda and add its path to $PATH instead of building it from base.
#### Update: As of writing this library there seems to be a open issue [here](https://github.com/keras-team/keras/issues/12640)
Same quick fix is applied by hacking into the keras library ../keras/utils/vis_utils.py and change
```python
import pydot
```
to
```python
import pydot_ng as pydot
```
Then run LSTM/predict.py
```bash
python LSTM/predict.py
```
# Citations: If you use this code in your work. Please cite the paper [here](https://www.researchgate.net/publication/335690482_Optimal_Reservoir_Operations_using_Long_Short-Term_Memory_Network)
# Enjoy!