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
a4df1634
Commit
a4df1634
authored
Aug 10, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update logging
parent
5b019098
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
examples/FasterRCNN/data.py
examples/FasterRCNN/data.py
+1
-1
tensorpack/models/batch_norm.py
tensorpack/models/batch_norm.py
+2
-2
tensorpack/utils/utils.py
tensorpack/utils/utils.py
+1
-1
No files found.
examples/FasterRCNN/data.py
View file @
a4df1634
...
@@ -52,7 +52,7 @@ def print_class_histogram(roidbs):
...
@@ -52,7 +52,7 @@ def print_class_histogram(roidbs):
data
=
list
(
itertools
.
chain
(
*
[[
class_names
[
i
+
1
],
v
]
for
i
,
v
in
enumerate
(
gt_hist
[
1
:])]))
data
=
list
(
itertools
.
chain
(
*
[[
class_names
[
i
+
1
],
v
]
for
i
,
v
in
enumerate
(
gt_hist
[
1
:])]))
COL
=
min
(
6
,
len
(
data
))
COL
=
min
(
6
,
len
(
data
))
total_instances
=
sum
(
data
[
1
::
2
])
total_instances
=
sum
(
data
[
1
::
2
])
data
.
extend
([
None
]
*
(
COL
-
len
(
data
)
%
COL
))
data
.
extend
([
None
]
*
(
(
COL
-
len
(
data
)
%
COL
)
%
COL
))
data
.
extend
([
"total"
,
total_instances
])
data
.
extend
([
"total"
,
total_instances
])
data
=
itertools
.
zip_longest
(
*
[
data
[
i
::
COL
]
for
i
in
range
(
COL
)])
data
=
itertools
.
zip_longest
(
*
[
data
[
i
::
COL
]
for
i
in
range
(
COL
)])
# the first line is BG
# the first line is BG
...
...
tensorpack/models/batch_norm.py
View file @
a4df1634
...
@@ -11,7 +11,7 @@ from ..tfutils.collection import backup_collection, restore_collection
...
@@ -11,7 +11,7 @@ from ..tfutils.collection import backup_collection, restore_collection
from
..tfutils.common
import
get_tf_version_tuple
from
..tfutils.common
import
get_tf_version_tuple
from
..tfutils.tower
import
get_current_tower_context
from
..tfutils.tower
import
get_current_tower_context
from
..utils
import
logger
from
..utils
import
logger
from
..utils.argtools
import
get_data_format
from
..utils.argtools
import
get_data_format
,
log_once
from
..utils.develop
import
log_deprecated
from
..utils.develop
import
log_deprecated
from
.common
import
VariableHolder
,
layer_register
from
.common
import
VariableHolder
,
layer_register
from
.tflayer
import
convert_to_tflayer_args
,
rename_get_variable
from
.tflayer
import
convert_to_tflayer_args
,
rename_get_variable
...
@@ -216,7 +216,7 @@ def BatchNorm(inputs, axis=None, training=None, momentum=0.9, epsilon=1e-5,
...
@@ -216,7 +216,7 @@ def BatchNorm(inputs, axis=None, training=None, momentum=0.9, epsilon=1e-5,
assert
TF_version
>=
(
1
,
4
),
\
assert
TF_version
>=
(
1
,
4
),
\
"Fine tuning a BatchNorm model with fixed statistics needs TF>=1.4!"
"Fine tuning a BatchNorm model with fixed statistics needs TF>=1.4!"
if
ctx
.
is_main_training_tower
:
# only warn in first tower
if
ctx
.
is_main_training_tower
:
# only warn in first tower
log
ger
.
warn
(
"[BatchNorm] Using moving_mean/moving_variance in training."
)
log
_once
(
"Some BatchNorm layer uses moving_mean/moving_variance in training."
,
func
=
'warn'
)
# Using moving_mean/moving_variance in training, which means we
# Using moving_mean/moving_variance in training, which means we
# loaded a pre-trained BN and only fine-tuning the affine part.
# loaded a pre-trained BN and only fine-tuning the affine part.
...
...
tensorpack/utils/utils.py
View file @
a4df1634
...
@@ -261,7 +261,7 @@ def find_library_full_path(name):
...
@@ -261,7 +261,7 @@ def find_library_full_path(name):
if
'lib'
+
name
+
'.so'
in
basename
:
if
'lib'
+
name
+
'.so'
in
basename
:
if
os
.
path
.
isfile
(
sofile
):
if
os
.
path
.
isfile
(
sofile
):
return
os
.
path
.
realpath
(
sofile
)
return
os
.
path
.
realpath
(
sofile
)
except
PermissionError
:
except
(
OSError
,
IOError
)
:
# can fail in certain environment (e.g. chroot)
# can fail in certain environment (e.g. chroot)
# if the pids are incorrectly mapped
# if the pids are incorrectly mapped
pass
pass
...
...
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