Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
AMBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
AMBS
Commits
54a21996
Commit
54a21996
authored
2 years ago
by
Yan Ji
Browse files
Options
Downloads
Patches
Plain Diff
update main_predict.py
parent
6fb659a9
No related branches found
No related tags found
No related merge requests found
Pipeline
#106902
failed
2 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
video_prediction_tools/main_scripts/main_predict.py
+10
-4
10 additions, 4 deletions
video_prediction_tools/main_scripts/main_predict.py
with
10 additions
and
4 deletions
video_prediction_tools/main_scripts/main_predict.py
+
10
−
4
View file @
54a21996
...
...
@@ -407,7 +407,10 @@ class Postprocess(TrainModel):
test_handle
=
test_iterator
.
string_handle
()
dataset_iterator
=
tf
.
data
.
Iterator
.
from_string_handle
(
test_handle
,
test_tf_dataset
.
output_types
,
test_tf_dataset
.
output_shapes
)
self
.
input_iter
,
self
.
ts_iter
=
dataset_iterator
.
get_next
()
self
.
inputs
=
dataset_iterator
.
get_next
()
self
.
input_iter
,
self
.
ts_iter
=
self
.
inputs
[
0
],
self
.
inputs
[
1
]
#self.input_iter, self.ts_iter = dataset_iterator.get_next()
# ts_iter = input_iter["T_start"]
# return input_iter, ts_iter
...
...
@@ -558,6 +561,7 @@ class Postprocess(TrainModel):
# init sample index for looping
sample_ind
=
0
nsamples
=
self
.
num_samples_per_epoch
print
(
'
test samples: {}
'
.
format
(
nsamples
))
# # initialize xarray datasets
# eval_metric_ds = Postprocess.init_metric_ds(self.fcst_products, self.eval_metrics, self.vars_in[self.channel],
# nsamples, self.future_length)
...
...
@@ -570,8 +574,10 @@ class Postprocess(TrainModel):
print
(
"
%{0}: Start generating {1:d} predictions at current sample index {2:d}
"
.
format
(
method
,
self
.
batch_size
,
sample_ind
))
input_results
=
self
.
sess
.
run
(
self
.
input_iter
)
t_starts
=
self
.
sess
.
run
(
self
.
ts_iter
)
input_data
=
self
.
sess
.
run
(
self
.
inputs
)
input_results
,
t_starts
=
input_data
[
0
],
input_data
[
1
]
#input_results = self.sess.run(self.input_iter)
#t_starts = self.sess.run(self.ts_iter)
# print('self.input_iter: {}'.format(self.input_iter.items()))
# t_starts = input_results["T_start"]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment