Comments (7)
@sishue good point. In tensorflow, it's very difficult to have reproducible results (especially on a GPU).
from keras-tcn.
Just a heads-up that reproducible results are possible on (NVIDIA) GPUs using the tensorflow-determinism library. I've been getting reproducible results consistently for CNNs, and I also just tested with keras-tcn
and got reproducible results, so it is possible.
from keras-tcn.
@lingdoc yeah you're right. Can you detail the steps to make it reproducible? That would be highly appreciated!
from keras-tcn.
Is it just adding those lines at the beginning of the script that you run?
import tensorflow as tf
from tfdeterminism import patch
patch()
os.environ['PYTHONHASHSEED']=str(SEED)
random.seed(SEED)
np.random.seed(SEED)
tf.set_random_seed(SEED)
# use tf as normal
from keras-tcn.
yes, after installing the library and setting SEED
to some value, i.e. SEED = 54
. I'm running on TF 1.15, btw - haven't tried it on TF 2.0
This should ensure that any sources of randomization, like shuffle=True
in the Keras model.fit()
call or the various split
functions in sklearn
will be deterministic, provided they are using one of these random seeds. One caveat is that if you change your hardware or model architecture it seems the results will be different, but as long as all the hardware is the same I get the same outcome from running the same model.
from keras-tcn.
That sounds already very promising! Thank you very much for the feedback. I'm going to add it to the README
from keras-tcn.
Done! @sishue try the tensorflow-determinism library. It should work!
from keras-tcn.
Related Issues (20)
- TCN for Time Series Image Classification HOT 3
- ValueError: Cannot serialize LeakyReLU since it doesn't implement `get_config()`, and also doesn have `__name__` HOT 2
- setup.py requirements on mac os HOT 7
- How do I use a masking layer for TCN? I want to mask certain time steps which are missing. HOT 4
- ValueError: Unknown layer: TCN when trying to load saved model HOT 3
- Dilations and nb_stack relationship HOT 4
- The parameter of the TCN HOT 7
- Masking time steps in order to use TCN for variable length sequences HOT 2
- data shape of tcn layer HOT 1
- help one regression per sequence HOT 1
- Ensuring unique weights when a model uses multiple TCNs HOT 2
- Question: TCN Dilated Convolutions? HOT 3
- How can i use TCN to build seq2seq model? HOT 1
- keras-tcn for R HOT 3
- Visualization of internal structure of TCN block HOT 1
- Low accuracy in keras-tuner based TCN model for audio classification HOT 6
- Saving a loaded model gets warning and then fails to open HOT 1
- exchange_rate.txt HOT 5
- Question: Skip connections HOT 2
- Why is the data form (batch_size, timesteps, input_dim) instead less accurate than (batch_size, input_dim, timesteps)?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-tcn.