Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
c9226e90
You need to sign in or sign up before continuing.
Commit
c9226e90
authored
Aug 11, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print deprecate warning only once #377
parent
27957082
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tensorpack/callbacks/inference.py
tensorpack/callbacks/inference.py
+4
-2
No files found.
tensorpack/callbacks/inference.py
View file @
c9226e90
...
@@ -9,6 +9,7 @@ from six.moves import zip
...
@@ -9,6 +9,7 @@ from six.moves import zip
from
.base
import
Callback
from
.base
import
Callback
from
..utils
import
logger
from
..utils
import
logger
from
..utils.utils
import
execute_only_once
from
..utils.stats
import
RatioCounter
,
BinaryStatistics
from
..utils.stats
import
RatioCounter
,
BinaryStatistics
from
..tfutils.common
import
get_op_tensor_name
from
..tfutils.common
import
get_op_tensor_name
...
@@ -57,7 +58,7 @@ class Inferencer(Callback):
...
@@ -57,7 +58,7 @@ class Inferencer(Callback):
try
:
try
:
ret
=
self
.
_get_fetches
()
ret
=
self
.
_get_fetches
()
except
NotImplementedError
:
except
NotImplementedError
:
logger
.
warn
(
"Inferencer._get_output_tensors was renamed to _get_fetches"
)
logger
.
warn
(
"Inferencer._get_output_tensors was
deprecated and
renamed to _get_fetches"
)
ret
=
self
.
_get_output_tensors
()
ret
=
self
.
_get_output_tensors
()
return
[
get_op_tensor_name
(
n
)[
1
]
for
n
in
ret
]
return
[
get_op_tensor_name
(
n
)[
1
]
for
n
in
ret
]
...
@@ -79,7 +80,8 @@ class Inferencer(Callback):
...
@@ -79,7 +80,8 @@ class Inferencer(Callback):
try
:
try
:
self
.
_on_fetches
(
results
)
self
.
_on_fetches
(
results
)
except
NotImplementedError
:
except
NotImplementedError
:
logger
.
warn
(
"Inferencer._datapoint was renamed to _on_fetches"
)
if
execute_only_once
():
logger
.
warn
(
"Inferencer._datapoint was deprecated and renamed to _on_fetches."
)
self
.
_datapoint
(
results
)
self
.
_datapoint
(
results
)
def
_datapoint
(
self
,
results
):
def
_datapoint
(
self
,
results
):
...
...
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