Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tfjs-converter/python/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r requirements.txt
pylint==1.9.4; python_version < '3.0'
pylint==2.3.0; python_version > '3.0'
pylint==2.5.0; python_version > '3.0'
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _generate_fused_batchnorm(data_format, conv2d_func, count=1,
np.array(inputs),
shape=[1, 1, 6, 2] if data_format == "NHWC" else [1, 2, 1, 6],
dtype=dtypes.float32)
if conv2d_func == nn_ops.conv2d:
if conv2d_func == nn_ops.conv2d: # pylint: disable=W0143
weights = [1, 2, 3, 4, 0.1, 0.2, 0.3, 0.4]
weights_op = constant_op.constant(
np.array(weights), shape=[1, 2, 2, 2], dtype=dtypes.float32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def _convert_h5_group(group):
group_out = []
if 'weight_names' in group.attrs:
# This is a leaf node in namespace (e.g., 'Dense' in 'foo/bar/Dense').
names = [name for name in group.attrs['weight_names']]
names = group.attrs['weight_names'].tolist()

if not names:
return group_out

Expand Down
2 changes: 1 addition & 1 deletion tfjs-converter/python/tensorflowjs/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def map_layers_to_quantization_dtype(names, quantization_dtype_map):
'exactly one is supported')
fallthrough = dtype_name
continue
elif isinstance(patterns, str):
if isinstance(patterns, str):
patterns = list([patterns])

# Record matched weights for dtype
Expand Down