A CNN for time-series classification
Explanation of the code at robromijnders.github.io/CNN_tsc
A CNN for time-series classification
Thanks for the nice skeleton repo @RobRomijnders :)
When I run your code off-the-shelf after the tf_upgrades to TF 1.xx I hit the following error:
Traceback (most recent call last):
File "tsc_main.py", line 76, in <module>
cost_val, summ,acc_val = sess.run([model.cost,model.merged,model.accuracy],feed_dict = {model.input: X_batch, model.labels: y_batch, model.keep_prob:1.0})
File "/home/petteri/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 767, in run
run_metadata_ptr)
File "/home/petteri/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 952, in _run
fetch_handler = _FetchHandler(self._graph, fetches, feed_dict_string)
File "/home/petteri/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 408, in __init__
self._fetch_mapper = _FetchMapper.for_fetch(fetches)
File "/home/petteri/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 230, in for_fetch
return _ListFetchMapper(fetch)
File "/home/petteri/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 337, in __init__
self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
File "/home/petteri/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 337, in <listcomp>
self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
File "/home/petteri/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 227, in for_fetch
(fetch, type(fetch)))
TypeError: Fetch argument None has invalid type <class 'NoneType'>
When you run the tool with a dataset with a feature class missing e.g. 4 missing below
1,1.13324,1351.0,6862.4800000000005,3338.6999999999994,6859.446551724133
2,1.132653246753247,1350.7333333333336,6859.446551724133,4640.164285714285,6858.642028985517
3,1.132447198697068,1351.0458970099692,6858.642028985517,4996.519021739133,6860.627397260285
0,1.1325953916004556,1350.2446681415893,6860.627397260285,4993.749596774188,6862.286111111106
5,1.13324,1351.0,6862.4800000000005,3338.6999999999994,6859.446551724133
It throws:
InvalidArgumentError (see above for traceback): Received a label value of 5 which is outside the valid range of [0, 5). Label values: 1 2 3 0 5 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5
[[Node: SoftMax/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits = SparseSoftmaxCrossEntropyWithLogits[T=DT_FLOAT, Tlabels=DT_INT64, _device="/job:localhost/replica:0/task:0/cpu:0"](Fully_Connected2/add, _recv_Ground_truth_0)]]
but is fine if all classes are present 1 to 5.
1,1.13324,1351.0,6862.4800000000005,3338.6999999999994,6859.446551724133
2,1.132653246753247,1350.7333333333336,6859.446551724133,4640.164285714285,6858.642028985517
3,1.132447198697068,1351.0458970099692,6858.642028985517,4996.519021739133,6860.627397260285
4,1.1325953916004556,1350.2446681415893,6860.627397260285,4993.749596774188,6862.286111111106
5,1.13324,1351.0,6862.4800000000005,3338.6999999999994,6859.446551724133
Is this expected or a bug or limitation?
Thanks for the nice skeleton repo @RobRomijnders
I followed the given codes and was able to train a model and evaluate its accuracy.
However, the codes don't show how to make predictions given a model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.