Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
e00e0e13
"vscode:/vscode.git/clone" did not exist on "15430ccc2f514fb6c12568614b70740e1bed1bfc"
Commit
e00e0e13
authored
Dec 03, 2018
by
dreamdragon
Browse files
Merge remote-tracking branch 'upstream/master'
parents
b915db4e
402b561b
Changes
205
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
57 additions
and
96 deletions
+57
-96
research/astronet/astronet/ops/input_ops_test.py
research/astronet/astronet/ops/input_ops_test.py
+1
-1
research/astronet/astronet/predict.py
research/astronet/astronet/predict.py
+6
-9
research/astronet/astronet/train.py
research/astronet/astronet/train.py
+4
-4
research/astronet/astronet/util/BUILD
research/astronet/astronet/util/BUILD
+0
-51
research/astronet/astrowavenet/BUILD
research/astronet/astrowavenet/BUILD
+4
-4
research/astronet/astrowavenet/README.md
research/astronet/astrowavenet/README.md
+3
-6
research/astronet/astrowavenet/astrowavenet_model_test.py
research/astronet/astrowavenet/astrowavenet_model_test.py
+1
-1
research/astronet/astrowavenet/data/BUILD
research/astronet/astrowavenet/data/BUILD
+3
-3
research/astronet/astrowavenet/data/base.py
research/astronet/astrowavenet/data/base.py
+1
-1
research/astronet/astrowavenet/data/synthetic_transits.py
research/astronet/astrowavenet/data/synthetic_transits.py
+1
-1
research/astronet/astrowavenet/trainer.py
research/astronet/astrowavenet/trainer.py
+3
-4
research/astronet/light_curve/BUILD
research/astronet/light_curve/BUILD
+0
-0
research/astronet/light_curve/README.md
research/astronet/light_curve/README.md
+19
-0
research/astronet/light_curve/__init__.py
research/astronet/light_curve/__init__.py
+0
-0
research/astronet/light_curve/fast_ops/BUILD
research/astronet/light_curve/fast_ops/BUILD
+0
-0
research/astronet/light_curve/fast_ops/median.h
research/astronet/light_curve/fast_ops/median.h
+3
-3
research/astronet/light_curve/fast_ops/median_filter.cc
research/astronet/light_curve/fast_ops/median_filter.cc
+2
-2
research/astronet/light_curve/fast_ops/median_filter.h
research/astronet/light_curve/fast_ops/median_filter.h
+3
-3
research/astronet/light_curve/fast_ops/median_filter_test.cc
research/astronet/light_curve/fast_ops/median_filter_test.cc
+2
-2
research/astronet/light_curve/fast_ops/median_test.cc
research/astronet/light_curve/fast_ops/median_test.cc
+1
-1
No files found.
research/astronet/astronet/ops/input_ops_test.py
View file @
e00e0e13
...
...
@@ -21,7 +21,7 @@ from __future__ import print_function
import
tensorflow
as
tf
from
astronet.ops
import
input_ops
from
astronet.
util
import
configdict
from
tf_
util
import
configdict
class
InputOpsTest
(
tf
.
test
.
TestCase
):
...
...
research/astronet/astronet/predict.py
View file @
e00e0e13
...
...
@@ -27,9 +27,9 @@ import tensorflow as tf
from
astronet
import
models
from
astronet.data
import
preprocess
from
astronet.util
import
config_util
from
astronet.util
import
configdict
from
astronet.util
import
estimator_util
from
tf_util
import
config_util
from
tf_util
import
configdict
parser
=
argparse
.
ArgumentParser
()
...
...
@@ -102,8 +102,9 @@ def _process_tce(feature_config):
"Only 'global_view' and 'local_view' features are supported."
)
# Read and process the light curve.
time
,
flux
=
preprocess
.
read_and_process_light_curve
(
FLAGS
.
kepler_id
,
FLAGS
.
kepler_data_dir
)
all_time
,
all_flux
=
preprocess
.
read_light_curve
(
FLAGS
.
kepler_id
,
FLAGS
.
kepler_data_dir
)
time
,
flux
=
preprocess
.
process_light_curve
(
all_time
,
all_flux
)
time
,
flux
=
preprocess
.
phase_fold_and_sort_light_curve
(
time
,
flux
,
FLAGS
.
period
,
FLAGS
.
t0
)
...
...
@@ -158,11 +159,7 @@ def main(_):
# Create an input function.
def
input_fn
():
return
{
"time_series_features"
:
tf
.
estimator
.
inputs
.
numpy_input_fn
(
features
,
batch_size
=
1
,
shuffle
=
False
,
queue_capacity
=
1
)()
}
return
tf
.
data
.
Dataset
.
from_tensors
({
"time_series_features"
:
features
})
# Generate the predictions.
for
predictions
in
estimator
.
predict
(
input_fn
):
...
...
research/astronet/astronet/train.py
View file @
e00e0e13
...
...
@@ -24,10 +24,10 @@ import sys
import
tensorflow
as
tf
from
astronet
import
models
from
astronet.util
import
config_util
from
astronet.util
import
configdict
from
astronet.util
import
estimator_runner
from
astronet.util
import
estimator_util
from
tf_util
import
config_util
from
tf_util
import
configdict
from
tf_util
import
estimator_runner
parser
=
argparse
.
ArgumentParser
()
...
...
@@ -68,7 +68,7 @@ parser.add_argument(
parser
.
add_argument
(
"--train_steps"
,
type
=
int
,
default
=
10000
,
default
=
625
,
help
=
"Total number of steps to train the model for."
)
parser
.
add_argument
(
...
...
research/astronet/astronet/util/BUILD
View file @
e00e0e13
...
...
@@ -2,42 +2,6 @@ package(default_visibility = ["//visibility:public"])
licenses
([
"notice"
])
# Apache 2.0
py_library
(
name
=
"configdict"
,
srcs
=
[
"configdict.py"
],
srcs_version
=
"PY2AND3"
,
deps
=
[
],
)
py_test
(
name
=
"configdict_test"
,
size
=
"small"
,
srcs
=
[
"configdict_test.py"
],
srcs_version
=
"PY2AND3"
,
deps
=
[
":configdict"
],
)
py_library
(
name
=
"config_util"
,
srcs
=
[
"config_util.py"
],
srcs_version
=
"PY2AND3"
,
)
py_test
(
name
=
"config_util_test"
,
size
=
"small"
,
srcs
=
[
"config_util_test.py"
],
srcs_version
=
"PY2AND3"
,
deps
=
[
":config_util"
],
)
py_library
(
name
=
"estimator_runner"
,
srcs
=
[
"estimator_runner.py"
],
srcs_version
=
"PY2AND3"
,
)
py_library
(
name
=
"estimator_util"
,
srcs
=
[
"estimator_util.py"
],
...
...
@@ -48,18 +12,3 @@ py_library(
"//astronet/ops:training"
,
],
)
py_library
(
name
=
"example_util"
,
srcs
=
[
"example_util.py"
],
srcs_version
=
"PY2AND3"
,
visibility
=
[
"//visibility:public"
],
)
py_test
(
name
=
"example_util_test"
,
size
=
"small"
,
srcs
=
[
"example_util_test.py"
],
srcs_version
=
"PY2AND3"
,
deps
=
[
":example_util"
],
)
research/astronet/astrowavenet/BUILD
View file @
e00e0e13
...
...
@@ -11,12 +11,12 @@ py_binary(
deps
=
[
":astrowavenet_model"
,
":configurations"
,
"//astronet/util:config_util"
,
"//astronet/util:configdict"
,
"//astronet/util:estimator_runner"
,
"//astrowavenet/data:kepler_light_curves"
,
"//astrowavenet/data:synthetic_transits"
,
"//astrowavenet/util:estimator_util"
,
"//tf_util:config_util"
,
"//tf_util:configdict"
,
"//tf_util:estimator_runner"
,
],
)
...
...
@@ -44,6 +44,6 @@ py_test(
deps
=
[
":astrowavenet_model"
,
":configurations"
,
"//
astronet/
util:configdict"
,
"//
tf_
util:configdict"
,
],
)
research/astronet/astrowavenet/README.md
View file @
e00e0e13
...
...
@@ -15,13 +15,10 @@ Chris Shallue: [@cshallue](https://github.com/cshallue)
## Additional Dependencies
This package requires TensorFlow 1.12 or greater. As of October 2018, this
requires the
**TensorFlow nightly build**
(
[
instructions
](
https://www.tensorflow.org/install/pip
)
).
In addition to the dependencies listed in the top-level README, this package
requires:
In addition to the
[
required packages
](
../README.md#required-packages
)
listed in
the top-level README, this package requires:
*
**TensorFlow 1.12 or greater**
(
[
instructions
](
https://www.tensorflow.org/install/
)
)
*
**TensorFlow Probability**
(
[
instructions
](
https://www.tensorflow.org/probability/install
)
)
*
**Six**
(
[
instructions
](
https://pypi.org/project/six/
)
)
...
...
research/astronet/astrowavenet/astrowavenet_model_test.py
View file @
e00e0e13
...
...
@@ -21,8 +21,8 @@ from __future__ import print_function
import
numpy
as
np
import
tensorflow
as
tf
from
astronet.util
import
configdict
from
astrowavenet
import
astrowavenet_model
from
tf_util
import
configdict
class
AstrowavenetTest
(
tf
.
test
.
TestCase
):
...
...
research/astronet/astrowavenet/data/BUILD
View file @
e00e0e13
...
...
@@ -9,7 +9,7 @@ py_library(
],
deps
=
[
"//astronet/ops:dataset_ops"
,
"//
astronet/
util:configdict"
,
"//
tf_
util:configdict"
,
],
)
...
...
@@ -28,7 +28,7 @@ py_library(
],
deps
=
[
":base"
,
"//
astronet/
util:configdict"
,
"//
tf_
util:configdict"
,
],
)
...
...
@@ -40,7 +40,7 @@ py_library(
deps
=
[
":base"
,
":synthetic_transit_maker"
,
"//
astronet/
util:configdict"
,
"//
tf_
util:configdict"
,
],
)
...
...
research/astronet/astrowavenet/data/base.py
View file @
e00e0e13
...
...
@@ -23,7 +23,7 @@ import six
import
tensorflow
as
tf
from
astronet.
util
import
configdict
from
tf_
util
import
configdict
from
astronet.ops
import
dataset_ops
...
...
research/astronet/astrowavenet/data/synthetic_transits.py
View file @
e00e0e13
...
...
@@ -21,7 +21,7 @@ from __future__ import print_function
import
numpy
as
np
import
tensorflow
as
tf
from
astronet.
util
import
configdict
from
tf_
util
import
configdict
from
astrowavenet.data
import
base
from
astrowavenet.data
import
synthetic_transit_maker
...
...
research/astronet/astrowavenet/trainer.py
View file @
e00e0e13
...
...
@@ -24,15 +24,14 @@ import os.path
from
absl
import
flags
import
tensorflow
as
tf
from
astronet.util
import
config_util
from
astronet.util
import
configdict
from
astronet.util
import
estimator_runner
from
astrowavenet
import
astrowavenet_model
from
astrowavenet
import
configurations
from
astrowavenet.data
import
kepler_light_curves
from
astrowavenet.data
import
synthetic_transits
from
astrowavenet.util
import
estimator_util
from
tf_util
import
config_util
from
tf_util
import
configdict
from
tf_util
import
estimator_runner
FLAGS
=
flags
.
FLAGS
...
...
research/astronet/light_curve
_util
/BUILD
→
research/astronet/light_curve/BUILD
View file @
e00e0e13
File moved
research/astronet/light_curve/README.md
0 → 100644
View file @
e00e0e13
# Light Curve Operations
## Code Author
Chris Shallue:
[
@cshallue
](
https://github.com/cshallue
)
## Python modules
*
`kepler_io`
: Functions for reading Kepler data.
*
`median_filter`
: Utility for smoothing data using a median filter.
*
`periodic_event`
: Event class, which represents a periodic event in a light curve.
*
`util`
: Light curve utility functions.
## Fast ops
The
[
fast_ops
](
fast_ops/
)
subdirectory contains optimized C++ light curve
operations. These operations can be compiled for Python using
[
CLIF
](
https://github.com/google/clif
)
. The
[
fast_ops/python
](
fast_ops/python/
)
directory contains CLIF API description files.
research/astronet/light_curve
_util
/__init__.py
→
research/astronet/light_curve/__init__.py
View file @
e00e0e13
File moved
research/astronet/light_curve
_util/cc
/BUILD
→
research/astronet/light_curve
/fast_ops
/BUILD
View file @
e00e0e13
File moved
research/astronet/light_curve
_util/cc
/median.h
→
research/astronet/light_curve
/fast_ops
/median.h
View file @
e00e0e13
...
...
@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
UTIL_CC
_MEDIAN_H_
#define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
UTIL_CC
_MEDIAN_H_
#ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
FAST_OPS
_MEDIAN_H_
#define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
FAST_OPS
_MEDIAN_H_
#include <algorithm>
#include <iterator>
...
...
@@ -70,4 +70,4 @@ typename std::iterator_traits<ForwardIterator>::value_type Median(
}
// namespace astronet
#endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
UTIL_CC
_MEDIAN_H_
#endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
FAST_OPS
_MEDIAN_H_
research/astronet/light_curve
_util/cc
/median_filter.cc
→
research/astronet/light_curve
/fast_ops
/median_filter.cc
View file @
e00e0e13
...
...
@@ -12,10 +12,10 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "light_curve
_util/cc
/median_filter.h"
#include "light_curve
/fast_ops
/median_filter.h"
#include "absl/strings/substitute.h"
#include "light_curve
_util/cc
/median.h"
#include "light_curve
/fast_ops
/median.h"
using
absl
::
Substitute
;
using
std
::
min
;
...
...
research/astronet/light_curve
_util/cc
/median_filter.h
→
research/astronet/light_curve
/fast_ops
/median_filter.h
View file @
e00e0e13
...
...
@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
UTIL_CC
_MEDIAN_FILTER_H_
#define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
UTIL_CC
_MEDIAN_FILTER_H_
#ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
FAST_OPS
_MEDIAN_FILTER_H_
#define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
FAST_OPS
_MEDIAN_FILTER_H_
#include <iostream>
...
...
@@ -56,4 +56,4 @@ bool MedianFilter(const std::vector<double>& x, const std::vector<double>& y,
}
// namespace astronet
#endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
UTIL_CC
_MEDIAN_FILTER_H_
#endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_
FAST_OPS
_MEDIAN_FILTER_H_
research/astronet/light_curve
_util/cc
/median_filter_test.cc
→
research/astronet/light_curve
/fast_ops
/median_filter_test.cc
View file @
e00e0e13
...
...
@@ -12,11 +12,11 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "light_curve
_util/cc
/median_filter.h"
#include "light_curve
/fast_ops
/median_filter.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "light_curve
_util/cc
/test_util.h"
#include "light_curve
/fast_ops
/test_util.h"
using
std
::
vector
;
using
testing
::
Pointwise
;
...
...
research/astronet/light_curve
_util/cc
/median_test.cc
→
research/astronet/light_curve
/fast_ops
/median_test.cc
View file @
e00e0e13
...
...
@@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "light_curve
_util/cc
/median.h"
#include "light_curve
/fast_ops
/median.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
...
...
Prev
1
2
3
4
5
6
7
…
11
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment