Giter Club home page Giter Club logo

convnetquake's Introduction

ConvNetQuake

Perol., T, M. Gharbi and M. Denolle. Convolutional Neural Network for Earthquake detection and location. Science Advances, Vol. 4, no. 2, e1700578, DOI: 10.1126/sciadv.1700578, 2018 Link.

Installation

  • Download repository
  • Install dependencies: pip install -r requirements.txt
  • Add directory to python path: ./setpath.sh
  • Run tests: ./runtests.sh (THIS NEEDS TO BE EXTENDED)
  • Download the data (roughly 70 Gb) and symlink to data ln -s data Downloads/data
  • Download the pre-trained models and symlink to models ln -s models Downloads/models

Data

ConvNetQuake is trained on data from Oklahoma (USA). The continuous waveform data and earthquake catalog are publicly available at https://www.iris.edu/hq/ and http://www.ou.edu/ogs.html

The data directory contains:

  • streams: 2.5 years of monthly streams from GSOK029 and GSOK027 in .mseed
  • catalogs: earthquake catalogs the OGS (years 2014 to 2016) and from Benz et al. 2015 (Feb. to Sept. 2014)
  • 6_clusters: windows used for training and testing of ConvNetQuake with 6 geographic areas
  • 50_clusters: windows used for training and testing of ConvNetQuake with 50 geographic areas
  • known_template: template T_1 used to generate synthetic data
  • unknown_template: template T_2 used to generate synthetic data
  • synth: directory of synthetic data for testing

Trained models

The directory models contains:

  • convnetquake: trained model for 6 geographic areas
  • 50_clusters: trained model for 50 geographic areas
  • synth: trained model on synthetic data

1 - What will you find in this repository ?

ConvNetQuake is a convolutional neural network that detect and locate events from a single waveform. This repository contains all the codes used to write our paper. For each step, we provide the commands to run.

2 - Train ConvNetQuake on a dataset

Steps to train the network on a dataset of waveforms:

  • Use a catalog of located events and partition them into clusters. This create a new catalog of labeled events. The script is in bin/preprocess.
  • Load month long continuous waveform data. Preprocess them (mean removal, normalization). Use the catalog of labeled events to create event windows from the continuous waveform data. Use a catalog to create noise windows from continuous waveform data. The codes are in bin/preprocess.
  • Train ConvNetQuake on the training windows, visualize of the training and evaluate on a test windows. The codes are in bin/.

Sections 2.1, 2.2 and 2.3 are required to reproduce the windows in data/6_clusters/detection Section 2.4 for training and testing of the network, also provided in models/convnetquake

2.1 - Partition earthquakes into clusters

Load the OGS catalog. Filter to keep the events located in the region of interest and after 15 February 2014. To partition the events into 6 clusters using K-Means, run:

./bin/preprocess/cluster_events --src data/catalogs/OK_2014-2015-2016.csv\
--dst data/6_clusters --n_components 6 --model KMeans

This outputs in data/6_clusters:

  • catalog_with_cluster_ids.csv: catalog of labeled events
  • clusters_metadata.json: number of events per clusters.

The code also plots the events on a map. The colored events are the training events, the black events are the events in the test set (July 2014).

The cluster labels range from 0 to M-1 with M the number of clusters chosen with --n-components.

2.2 Create labeled windows of events

Load a directory of month long streams and a catalog of labeled events. The script preprocess the month long streams (remove the mean, normalization). Using the origin time of the cataloged events and a mean seismic velocity between the station and the event location, we create 10 second long event windows.

./bin/preprocess/create_dataset_events.py --stream_dir data/streams\
--catalog data/6_clusters/catalog_with_cluster_ids.csv \
--output_dir data/6_clusters/events \
--save_mseed True --plot True

This create tfrecords containing all the event windows. Pass —-save_mseed to save the windows in .mseed. Pass —-plot to save the events in .png.

data_augmentation.py adds Gaussian noise and can stretch or shift the signal to generate new tfrecords.

./bin/preprocess/data_augmentation.py --tfrecords data/6_clusters/events \
--output data/6_clusters/augmented_data/augmented_stetch_std1-2.tfrecords \
--std_factor 1.2

You can pass various flags: --plot plot the generated windows, -—compress_data compress the signal, -—stretch_data stretch the signal, -—shift_data shifts the signal.

In Perol et al., 2017 we only add Gaussian noise. The other data augmentation techniques do not improve the accuracy of the network.

2.3 Create windows of noise

Load one month long stream and a catalog, preprocess the stream and create noise windows labeled with -1.

./bin/preprocess/create_dataset_noise.py \
--stream_path data/streams/GSOK029_8-2014.mseed \
--catalog data/catalogs/Benz_catalog.csv \
--output_dir data/noise_OK029/noise_august

This generates 10 second long windows when there is no event in the catalog. Check the flags in the code if you want to change this. -—max_windows controls the maximum number of windows to generate. The -—plot and —-save_mseed are available.

Note that in the case we do not account for the travel time because the detection times in Benz et al. 2015 correspond to the detected seismogram signal.

2.4 Train ConvNetQuake and monitor the accuracy on train and test sets

We split the tfrecords of windows for training and testing. The training set has two directories: positive containing the event windows and negative containing the noise windows.

To train ConvNetQuake (GPU recommended):

./bin/train --dataset data/6_clusters/train --checkpoint_dir output/convnetquake --n_clusters 6

This outputs checkpoints with saved weights and tensorboard events in the directory given by the checkpoint_dir flag. The checkpoints are named after the number of steps done during training. For example model-500 correspond to the weights after 500 steps of training. The configuration parameters (batch size, display step etc) are in quakenet/config.py.

The network architecture is stored in quakenet/models.py.

Note that we also provide the trained model in models/convnetquake.

During training, there are two things to monitor: the accuracy on the noise windows and the accuracy on event windows (CPUs are fine here). In both scripts, pass an integer in seconds to --eval_interval to set the time between each evaluation.

./bin/evaluate --checkpoint_dir output/convnetquake/ConvNetQuake \
--dataset data/6_clusters/test_events \
--eval_interval 10 --n_clusters 6 \
--events
./bin/evaluate --checkpoint_dir output/convnetquake/ConvNetQuake \
--dataset data/6_clusters/test_noise --eval_interval 10 \
--n_clusters 6 --noise

You can visualize the accuracy on the train and test set while the network is training. The accuracy for detection and for location is implemented. Run:

tensorboard --logdir output/convnetquake/ConvNetQuake

Monitoring detection accuracy on train and test sets during training of ConvNetQuake

You can also visualize the network architecture with tensorboard

ConvNetQuake architecture

3 - Detecting and locating events in continuous waveform data

There are two methods for detecting events from continuous waveform data. The first one is relatively slow, it loads a .mseed and generate windows. While the windows are generated they are fed to ConvNetQuake that makes the classification. A faster method does the classification from tfrecords. First windows, a generated and saved into tfrecords. Then the tfrecords are analyzed and classified by ConvNetQuake to create a catalog of events.

This second methods analyze one month of data in 4 min on a MacbookPro.

3.1 From .mseed

To create 10 second long windows with a 1 second offset and classify them, run:

./bin/predict_from_stream.py --stream_path data/streams/GSOK029_7-2014.mseed \
--checkpoint_dir models/convnetquake --n_clusters 6 \
--window_step 11 --output output/july_detections/from_stream \
--max_windows 8640

3.2 From tfrecords (faster, 4 min for 1 month of continuous data)

First, the windows are generated from a .mseed and stored into a tfrecords.

./bin/preprocess/convert_stream_to_tfrecords.py \
--stream_path data/streams/GSOK029_7-2014.mseed \
--output_dir  data/tfrecord \
--window_size 10 --window_step 11 \
--max_windows 5000

See the code for a documentation on the flags to pass. This code can be parallelized easily to speed up the process.

Then, the detection from the windows stored in tfrecords are made with

./bin/predict_from_tfrecords.py \
--dataset data/tfrecords_continuous_detection/july.tfrecords \
--checkpoint_dir models/convnetquake \
--n_clusters 6
--max_windows 2678400
--output output/july_detections

Check the flags for more options.

4 - Visualization of data

The codes for vizualization can be found in bin/viz.

4.1 - Print the cluster Id and number of events

./bin/viz/print_clusterid_from_tfrecords.py \
--data_path data/agu/detection/train/positive \
--windows 40000

4.2 - Visualize windows from tfrecords

./bin/viz/plot_windows_from_tfrecords.py \
--data_path data/tfrecords/GSOK029_2-2014 \
--output_path output/viz --windows 100

Load tfrecords from a directory and plot the windows.

4.3 - Plot events from a .mseed stream

./bin/viz/plot_events_in_stream.py \
--catalog data/6_clusters/catalog_with_cluster_ids.csv  \
--stream data/streams/GSOK029_7-2014.mseed \
--output check_this_out/events_in_stream \
--with_preprocessing

Load a .mseed with a catalog and plot the windows of events.

4.4 - Visualize mislabeled windows

To visualized the mislabeled windows from a net on a probabilistic map:

./bin/viz/misclassified_loc.py \
--dataset data/mseed_events \
--checkpoint_dir models/convnetquake \
--output wrong_windows --n_clusters 6

5 - Generate a synthetic stream/catalog pair

  • To generate 3600s of synthetic signal do:
./bin/create_synthetics --templates_dir data/streams/templates/\
--output_path data/synth --trace_duration 3600

This will output a .mseed stream and a .csv catalog to data/synth. The signal is a a white gaussian noise. Events are generated randomly with a uniform distance between events sampled from [1min, 1h]. These are inserted as a scaled copy of the template event

templates_dir should contain .mseed files with individual source templates e.g. templates_dir/templates01.mseed, templates_dir/templates02.mseed , etc.

You can use this data as any other dataset/catalog pair to generate .tfrecords.

6 - Template matching method

To train the template matching method (find the best beta parameter) on a training set (one stream, one template, one catalog) and perform a test on a test set ang get the score:

./bin/template_matching --train_data_path data/synth/stream.mseed \
--train_template_path data/streams/template_0.mseed \
--train_catalog_path data/synth/catalog.csv \
--test_data_path data/synth/stream.mseed \
--test_template_path data/streams/template_0.mseed \
--test_catalog_path data/synth/catalog.csv

It is possible to avoid training and only test on a stream. In this case beta = 8.5. Run

./bin/template_matching --test_data_path data/synth/stream.mseed \
--test_template_path data/streams/template_0.mseed \
--test_catalog_path data/synth/catalog.csv

7 - Codebase

Stream and catalog loaders are in quakenet/data_io.py.

quakenet/data_pipeline.py contains all the preprocessing/conversion/writing/loading of the data used by the network.

quakenet/synth_data.py contains the code that generates synthetic data from a set of templates

quakenet/models.py contains the tensorflow code for the architecture of ConvNetQuake

Tensorflow base model and layers can be found in tflib repository.

convnetquake's People

Contributors

tperol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

convnetquake's Issues

Data can't be downloaded

Hello,

Unfortunately dropbox won't let users download folders over a certain size. I get the error 'The zip file is too large'.

It would be much appreciated if you could zip everything into one zip file, and then upload it to Dropbox! I don't think there is a restriction on file size for 1 file, only for folders.

Thanks!

can't run the train step in model.py

First thank you for share this great code!
I tried to use the trained model of cluster 6 to classify my own data,however,the result is not ideal:for 10000 events it identify about 2000.
So I tried to train the model myself by running:
./bin/train --dataset data/6_clusters/detection/train/ --checkpoint_dir output/convnetquake_6/ --n_clusters 6, in the program tflib/model.py line 44:
data = sess.run(tofetch, options=run_options, run_metadata=run_metadata)
will stop and give this message:
2017-11-29 23:07:44.380113: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Name: , Feature: end_time (data type: int64) is required but could not be found.

It seems to be a version error,any version higher than 0.11 won't work.

Error when traning the model

Hello,
when I ran "./bin/train --dataset data/6_clusters/train --checkpoint_dir output/convnetquake --n_clusters 6",there is a error,
Traceback (most recent call last):
File "./bin/train", line 88, in
main(args)
File "./bin/train", line 70, in main
summary_step=10)
File "/playground/xu_zhen/fst/ConvNetQuake-master/bin/tflib/model.py", line 243, in train
coord.join(threads)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/coordinator.py", line 389, in join
six.reraise(*self._exc_info_to_raise)
File "/root/anaconda3/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/queue_runner_impl.py", line 238, in _run
enqueue_callable()
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1231, in _single_operation_run
target_list_as_strings, status, None)
File "/root/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Name: , Feature: end_time (data type: int64) is required but could not be found.
[[Node: inputs/ParseSingleExample/ParseExample/ParseExample = ParseExample[Ndense=6, Nsparse=0, Tdense=[DT_INT64, DT_STRING, DT_INT64, DT_INT64, DT_INT64, DT_INT64], dense_shapes=[[], [], [], [], [], []], sparse_types=[], _device="/job:localhost/replica:0/task:0/device:CPU:0"](inputs/ParseSingleExample/ExpandDims, inputs/ParseSingleExample/ParseExample/ParseExample/names, inputs/ParseSingleExample/ParseExample/ParseExample/dense_keys_0, inputs/ParseSingleExample/ParseExample/ParseExample/dense_keys_1, inputs/ParseSingleExample/ParseExample/ParseExample/dense_keys_2, inputs/ParseSingleExample/ParseExample/ParseExample/dense_keys_3, inputs/ParseSingleExample/ParseExample/ParseExample/dense_keys_4, inputs/ParseSingleExample/ParseExample/ParseExample/dense_keys_5, inputs/ParseSingleExample/ParseExample/Const, inputs/ParseSingleExample/ParseExample/ParseExample/names, inputs/ParseSingleExample/ParseExample/Const, inputs/ParseSingleExample/ParseExample/Const, inputs/ParseSingleExample/ParseExample/Const, inputs/ParseSingleExample/ParseExample/Const)]]

How can I solve this?

./runtests.sh

I have the next error when run runtest.sh
image
=============================================== ERRORS ================================================
___________________________ ERROR collecting quakenet/test/data_io_test.py ____________________________
../MY_VIRTUALENVS/ConvNetQuake/local/lib/python2.7/site-packages/_pytest/python.py:507: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
../MY_VIRTUALENVS/ConvNetQuake/local/lib/python2.7/site-packages/py/_path/local.py:701: in pyimport
import(modname)
E File "/home/jorge/ConvNetQuake-master/quakenet/test/data_io_test.py", line 14
E def test_write_stream()
E ^
E SyntaxError: invalid syntax

---------- coverage: platform linux2, python 2.7.17-final-0 ----------
Name Stmts Miss Cover

quakenet/init.py 5 0 100%
quakenet/config.py 12 12 0%
quakenet/data_conversion.py 39 39 0%
quakenet/data_io.py 24 24 0%
quakenet/data_pipeline.py 85 61 28%
quakenet/models.py 85 85 0%
quakenet/synth_data.py 88 88 0%
quakenet/test/init.py 0 0 100%
quakenet/test/data_conversion_test.py 0 0 100%
quakenet/test/data_pipeline_test.py 19 11 42%
quakenet/test/model_test.py 0 0 100%
quakenet/test/settings.py 7 0 100%

TOTAL 364 320 12%

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================= 1 error in 1.45 seconds =======================================

Model Question: Prediction Time

If we were to use the model to test it with real time data, and the model forecasts an earthquake, what is the expected time after the prediction or the magnitude of the earthquake?

Error in runtests.sh

There is a missing file or function in your data_pipeline.py file.
How do I solve this error? Please make suggestions about this.
FAILED quakenet/test/data_pipeline_test.py::test_data_generator_is_instantiated - AttributeError: module 'quakenet.data_pipeline' has no attribute 'DatasetGenerator'
FAILED quakenet/test/data_pipeline_test.py::test_data_generator_generates_samples - AttributeError: module 'quakenet.data_pipeline' has no attribute 'DatasetGenerator'

Screenshot from 2023-06-01 17-08-17

Error when inputting custom data

Hello,

I've successfully ran ConvNetQuake on the example .mseed data. When I feed my own data though, converting the .mseed data to tf records first, I get this error:

./bin/predict_from_tfrecords.py \
> --dataset data/tfrecordtz \
> --checkpoint_dir models/convnetquake \
> --n_clusters 6 \
> --max_windows 2678400 \
> --output data/output/tznew
/opt/conda/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
WARNING:tensorflow:From /data/tflib/model.py:35 in __init__.: all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Please use tf.global_variables instead.
Catalog created to store events data/output/tznew/catalog_detection.csv
WARNING:tensorflow:From ./bin/predict_from_tfrecords.py:89 in main.: initialize_local_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.local_variables_initializer` instead.
Loaded model at step 32000 from snapshot models/convnetquake/model-32000.
Predicting using model at step 32000
Evaluation completed (1 epochs).
joining data threads
Prediction took 0.0 min 0.0909900665283 seconds
Traceback (most recent call last):
  File "./bin/predict_from_tfrecords.py", line 178, in <module>
    main(args)
  File "./bin/predict_from_tfrecords.py", line 150, in main
    coord.join(threads)
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/training/coordinator.py", line 386, in join
    six.reraise(*self._exc_info_to_raise)
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/training/queue_runner_impl.py", line 234, in _run
    sess.run(enqueue_op)
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 766, in run
    run_metadata_ptr)
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 964, in _run
    feed_dict_string, options, run_metadata)
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1014, in _do_run
    target_list, options, run_metadata)
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1034, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 6003 values, but the requested shape has 3003
	 [[Node: validation_inputs/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](validation_inputs/DecodeRaw, validation_inputs/Reshape/shape)]]

Caused by op u'validation_inputs/Reshape', defined at:
  File "./bin/predict_from_tfrecords.py", line 178, in <module>
    main(args)
  File "./bin/predict_from_tfrecords.py", line 57, in main
    is_training=False)
  File "/data/quakenet/data_pipeline.py", line 152, in __init__
    samples = self._reader.read()
  File "/data/quakenet/data_pipeline.py", line 81, in read
    example = self._parse_example(serialized_example)
  File "/data/quakenet/data_pipeline.py", line 109, in _parse_example
    data = tf.reshape(data, [self.n_traces, self.win_size])
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2448, in reshape
    name=name)
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
    op_def=op_def)
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/opt/conda/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1128, in __init__
    self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 6003 values, but the requested shape has 3003
	 [[Node: validation_inputs/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](validation_inputs/DecodeRaw, validation_inputs/Reshape/shape)]]

Any ideas about how to solve this? I think it is a problem with how I have formatted the .mseed file, but I'm not sure what's wrong. Thanks!!

Tensorflow version error

When installing the dependencies, I get an error as following:

Collecting tensorflow==0.11.0rc1 (from -r requirements.txt (line 15))
  Could not find a version that satisfies the requirement tensorflow==0.11.0rc1 (from -r requirements.txt (line 15)) (from versions: 0.12.0rc0, 0.12.0rc1, 0.12.0, 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0)
No matching distribution found for tensorflow==0.11.0rc1 (from -r requirements.txt (line 15))

Can I use the newest version of Tensorflow to run this repo, such as TensorFlow 1.2rc0 ?

cant read issue

Hi
I managed to install this thing into a conda env.
If I try to run next command:
./bin/preprocess/cluster_events --src data/catalogs/OK_2014-2015-2016.csv --dst data/6_clusters/ --n_components 6 --model KMeans

I get this output...

./bin/preprocess/cluster_events: line 18: Clustering of events from a catalog.

We want to be able to predict the origin of an earthquake from its trace only.
This script labels events using an off-the-shelf clustering algorithm on their
geographic coordinates.

The classification we will solve seek to retrieve this label from the traces.

e.g.,
./bin/preprocess/cluster_events --src data/catalogs/OK_2014-2015-2016.csv--dst data/6_clusters --n_components 6 --model KMeans
: File name too long
from: can't read /var/mail/os
from: can't read /var/mail/quakenet
from: can't read /var/mail/quakenet
from: can't read /var/mail/mpl_toolkits.mplot3d
from: can't read /var/mail/quakenet.data_io
from: can't read /var/mail/obspy.core.utcdatetime
from: can't read /var/mail/sklearn.cluster
from: can't read /var/mail/sklearn.mixture

from: can't read /var/mail/openquake.hazardlib.geo.geodetic
./bin/preprocess/cluster_events: line 40: syntax error near unexpected token newline' ./bin/preprocess/cluster_events: line 40: gflags.DEFINE_string('

any ideas whats happening?
thanks

runtests.sh

As I run the test (runtests.sh), I get an error with py.test
Is this due to the TensorFlow version I'm using (1.2) ?

"
usage: py.test [options] [file_or_dir] [file_or_dir] [...]
py.test: error: unrecognized arguments: --cov=quakenet
inifile: None
rootdir: ~/ConvNetQuake
"

different window_size can't be used

Hi!I find the window_size can't be changed from default 10s to other numbers,if do so,in the train part it will fail when starting the train step loop.

To be more detailed,it will fail at subroutine _train_step in tflib/model.py:
data = sess.run(tofetch, options=run_options, run_metadata=run_metadata)

I guess it is related to the shape of tensor somewhere,but I don't know how to fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.