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
ee0e9d11
"vscode:/vscode.git/clone" did not exist on "84eb016c5f441d3bbc1acf8466929f74f29d91e7"
Unverified
Commit
ee0e9d11
authored
Jun 27, 2018
by
Chris Shallue
Committed by
GitHub
Jun 27, 2018
Browse files
Merge pull request #4628 from cshallue/master
Merge internal changes
parents
b54b536b
f27ec7f6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
research/astronet/astronet/data/generate_download_script.py
research/astronet/astronet/data/generate_download_script.py
+4
-1
research/astronet/astronet/ops/dataset_ops.py
research/astronet/astronet/ops/dataset_ops.py
+1
-1
research/astronet/light_curve_util/periodic_event.py
research/astronet/light_curve_util/periodic_event.py
+7
-0
research/astronet/light_curve_util/periodic_event_test.py
research/astronet/light_curve_util/periodic_event_test.py
+8
-1
No files found.
research/astronet/astronet/data/generate_download_script.py
View file @
ee0e9d11
...
...
@@ -33,6 +33,7 @@ from __future__ import print_function
import
argparse
import
csv
import
os
import
stat
import
sys
parser
=
argparse
.
ArgumentParser
()
...
...
@@ -90,7 +91,9 @@ def main(argv):
f
.
write
(
"echo 'Finished downloading {} Kepler targets to {}'
\n
"
.
format
(
num_kepids
,
FLAGS
.
download_dir
))
os
.
chmod
(
FLAGS
.
output_file
,
0o744
)
# Make the download script executable.
# Make the download script executable.
os
.
chmod
(
FLAGS
.
output_file
,
stat
.
S_IRWXU
|
stat
.
S_IRGRP
|
stat
.
S_IROTH
)
print
(
"{} Kepler targets will be downloaded to {}"
.
format
(
num_kepids
,
FLAGS
.
output_file
))
print
(
"To start download, run:
\n
{}"
.
format
(
"./"
+
FLAGS
.
output_file
...
...
research/astronet/astronet/ops/dataset_ops.py
View file @
ee0e9d11
...
...
@@ -193,7 +193,7 @@ def build_dataset(file_pattern,
table_initializer
,
default_value
=-
1
)
def
_example_parser
(
serialized_example
):
"""Parses a single tf.Example into
imag
e and label tensors."""
"""Parses a single tf.Example into
featur
e and label tensors."""
# Set specifications for parsing the features.
data_fields
=
{
feature_name
:
tf
.
FixedLenFeature
([
feature
.
length
],
tf
.
float32
)
...
...
research/astronet/light_curve_util/periodic_event.py
View file @
ee0e9d11
...
...
@@ -36,6 +36,13 @@ class Event(object):
self
.
_duration
=
duration
self
.
_t0
=
t0
def
__str__
(
self
):
return
"<period={}, duration={}, t0={}>"
.
format
(
self
.
period
,
self
.
duration
,
self
.
t0
)
def
__repr__
(
self
):
return
"Event({})"
.
format
(
str
(
self
))
@
property
def
period
(
self
):
return
self
.
_period
...
...
research/astronet/light_curve_util/periodic_event_test.py
View file @
ee0e9d11
...
...
@@ -25,6 +25,13 @@ from light_curve_util.periodic_event import Event
class
EventTest
(
absltest
.
TestCase
):
def
testStr
(
self
):
self
.
assertEqual
(
str
(
Event
(
1
,
2
,
3
)),
"<period=1, duration=2, t0=3>"
)
def
testRepr
(
self
):
self
.
assertEqual
(
repr
(
Event
(
1
,
2
,
3
)),
"Event(<period=1, duration=2, t0=3>)"
)
def
testEquals
(
self
):
event
=
Event
(
period
=
100
,
duration
=
5
,
t0
=
2
)
...
...
@@ -72,5 +79,5 @@ class EventTest(absltest.TestCase):
event
.
equals
(
Event
(
period
=
100
,
duration
=
5
,
t0
=
10
),
t0_durations
=
2
))
if
__name__
==
'
__main__
'
:
if
__name__
==
"
__main__
"
:
absltest
.
main
()
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