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
4 changes: 2 additions & 2 deletions tensorflow_addons/activations/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ py_library(
name = "activations",
srcs = [
"__init__.py",
"sparsemax.py"
"sparsemax.py",
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow_addons/utils:utils",
"//tensorflow_addons/utils",
],
)

Expand Down
8 changes: 5 additions & 3 deletions tensorflow_addons/custom_ops/image/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ licenses(["notice"]) # Apache 2.0

package(default_visibility = ["//visibility:public"])


cc_binary(
name = "_distort_image_ops.so",
srcs = [
"cc/kernels/adjust_hsv_in_yiq_op.cc",
"cc/kernels/adjust_hsv_in_yiq_op.h",
"cc/ops/distort_image_ops.cc",
],
copts = [
"-pthread",
"-std=c++11",
"-D_GLIBCXX_USE_CXX11_ABI=0",
],
linkshared = 1,
deps = [
"@local_config_tf//:libtensorflow_framework",
"@local_config_tf//:tf_header_lib",
],
copts = ["-pthread", "-std=c++11", "-D_GLIBCXX_USE_CXX11_ABI=0"]
)


cc_binary(
name = "_image_ops.so",
srcs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class ImageProjectiveTransformV2 : public OpKernel {
Interpolation interpolation_;

public:
explicit ImageProjectiveTransformV2(OpKernelConstruction* ctx) : OpKernel(ctx) {
explicit ImageProjectiveTransformV2(OpKernelConstruction* ctx)
: OpKernel(ctx) {
string interpolation_str;
OP_REQUIRES_OK(ctx, ctx->GetAttr("interpolation", &interpolation_str));
if (interpolation_str == "NEAREST") {
Expand Down
3 changes: 1 addition & 2 deletions tensorflow_addons/custom_ops/seq2seq/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ licenses(["notice"]) # Apache 2.0

package(default_visibility = ["//visibility:public"])


cc_binary(
name = "_beam_search_ops.so",
srcs = [
Expand All @@ -21,4 +20,4 @@ cc_binary(
"@local_config_tf//:libtensorflow_framework",
"@local_config_tf//:tf_header_lib",
],
)
)
1 change: 0 additions & 1 deletion tensorflow_addons/custom_ops/text/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ licenses(["notice"]) # Apache 2.0

package(default_visibility = ["//visibility:public"])


cc_binary(
name = "_skip_gram_ops.so",
srcs = [
Expand Down
5 changes: 2 additions & 3 deletions tensorflow_addons/image/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ licenses(["notice"]) # Apache 2.0

package(default_visibility = ["//visibility:public"])


py_library(
name = "image",
srcs = ([
Expand All @@ -13,7 +12,7 @@ py_library(
data = [
"//tensorflow_addons/custom_ops/image:_distort_image_ops.so",
"//tensorflow_addons/custom_ops/image:_image_ops.so",
"//tensorflow_addons/utils:utils",
"//tensorflow_addons/utils",
],
srcs_version = "PY2AND3",
)
Expand All @@ -25,10 +24,10 @@ py_test(
"distort_image_ops_test.py",
],
main = "distort_image_ops_test.py",
srcs_version = "PY2AND3",
deps = [
":image",
],
srcs_version = "PY2AND3"
)

# TODO: use cuda_test later.
Expand Down
14 changes: 7 additions & 7 deletions tensorflow_addons/layers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ py_library(
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow_addons/utils:utils",
"//tensorflow_addons/activations:activations",
"//tensorflow_addons/activations",
"//tensorflow_addons/utils",
],
)

Expand All @@ -29,7 +29,7 @@ py_test(
srcs_version = "PY2AND3",
deps = [
":layers",
]
],
)

py_test(
Expand All @@ -55,18 +55,18 @@ py_test(
srcs_version = "PY2AND3",
deps = [
":layers",
]
],
)

py_test(
name = "layers_normalizations_test",
size= "small",
size = "small",
srcs = [
"normalizations_test.py",
],
main = "normalizations_test.py",
srcs_version = "PY2AND3",
deps = [
":layers",
]
":layers",
],
)
6 changes: 3 additions & 3 deletions tensorflow_addons/losses/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ py_library(
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow_addons/utils:utils",
"//tensorflow_addons/activations:activations",
"//tensorflow_addons/activations",
"//tensorflow_addons/utils",
],
)

Expand All @@ -39,10 +39,10 @@ py_test(
"sparsemax_loss_test.py",
],
main = "sparsemax_loss_test.py",
srcs_version = "PY2AND3",
deps = [
":losses",
],
srcs_version = "PY2AND3",
)

py_test(
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_addons/optimizers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ py_library(
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow_addons/utils:utils",
"//tensorflow_addons/utils",
],
)

Expand Down
3 changes: 1 addition & 2 deletions tensorflow_addons/seq2seq/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ licenses(["notice"]) # Apache 2.0

package(default_visibility = ["//visibility:public"])


py_library(
name = "seq2seq",
srcs = [
Expand All @@ -19,7 +18,7 @@ py_library(
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow_addons/utils:utils",
"//tensorflow_addons/utils",
],
)

Expand Down
27 changes: 14 additions & 13 deletions tensorflow_addons/seq2seq/attention_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ def with_same_shape(old, new):
new_shape = array_ops.shape(new)
old_shape = array_ops.shape(old)
with ops.control_dependencies([
check_ops.assert_equal(
check_ops.assert_equal( # pylint: disable=bad-continuation
new_shape,
old_shape,
data=[new_shape, old_shape])
Expand Down Expand Up @@ -1491,8 +1491,9 @@ def _maybe_mask_score(score,
message = ("All values in memory_sequence_length must greater than "
"zero.")
with ops.control_dependencies([
check_ops.assert_positive(
memory_sequence_length, message=message)
check_ops.assert_positive( # pylint: disable=bad-continuation
memory_sequence_length,
message=message)
]):
memory_mask = array_ops.sequence_mask(
memory_sequence_length, maxlen=array_ops.shape(score)[1])
Expand Down Expand Up @@ -1759,8 +1760,8 @@ def __init__(self,
"initial state via the tf.contrib.seq2seq.tile_batch "
"function with argument multiple=beam_width.")
with ops.control_dependencies(
self._batch_size_checks(state_batch_size,
error_message)):
self._batch_size_checks( # pylint: disable=bad-continuation
state_batch_size, error_message)):
self._initial_cell_state = nest.map_structure(
lambda s: array_ops.identity(
s, name="check_initial_cell_state"),
Expand All @@ -1785,9 +1786,9 @@ def _item_or_tuple(self, seq):
seq: A non-empty sequence of items or generator.

Returns:
Either the values in the sequence as a tuple if
AttentionMechanism(s) were passed to the constructor as a sequence
or the singular element.
Either the values in the sequence as a tuple if
AttentionMechanism(s) were passed to the constructor as a sequence
or the singular element.
"""
t = tuple(seq)
if self._is_multi:
Expand All @@ -1807,8 +1808,8 @@ def state_size(self):
"""The `state_size` property of `AttentionWrapper`.

Returns:
An `AttentionWrapperState` tuple containing shapes used by this
object.
An `AttentionWrapperState` tuple containing shapes used
by this object.
"""
return AttentionWrapperState(
cell_state=self._cell.state_size,
Expand Down Expand Up @@ -1843,7 +1844,7 @@ def zero_state(self, batch_size, dtype):
to the wrapper object at initialization time.
"""
with ops.name_scope(
type(self).__name__ + "ZeroState", values=[batch_size]):
type(self).__name__ + "ZeroState", values=[batch_size]): # pylint: disable=bad-continuation
if self._initial_cell_state is not None:
cell_state = self._initial_cell_state
else:
Expand All @@ -1859,7 +1860,7 @@ def zero_state(self, batch_size, dtype):
"tf.contrib.seq2seq.tile_batch, and the batch_size= argument "
"passed to zero_state is batch_size * beam_width.")
with ops.control_dependencies(
self._batch_size_checks(batch_size, error_message)):
self._batch_size_checks(batch_size, error_message)): # pylint: disable=bad-continuation
cell_state = nest.map_structure(
lambda s: array_ops.identity(s, name="checked_cell_state"),
cell_state)
Expand Down Expand Up @@ -1938,7 +1939,7 @@ def call(self, inputs, state):
"via the tf.contrib.seq2seq.tile_batch function with argument "
"multiple=beam_width.")
with ops.control_dependencies(
self._batch_size_checks(cell_batch_size, error_message)):
self._batch_size_checks(cell_batch_size, error_message)): # pylint: disable=bad-continuation
cell_output = array_ops.identity(
cell_output, name="checked_cell_output")

Expand Down
4 changes: 2 additions & 2 deletions tensorflow_addons/text/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ py_library(
"__init__.py",
"skip_gram_ops.py",
]),
srcs_version = "PY2AND3",
data = [
"//tensorflow_addons/custom_ops/text:_skip_gram_ops.so",
"//tensorflow_addons/utils:utils",
"//tensorflow_addons/utils",
],
srcs_version = "PY2AND3",
)

py_test(
Expand Down
2 changes: 1 addition & 1 deletion tools/ci_build/builds/builds_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ get_changed_files_from_master_branch() {
# Usage: get_bazel_files_to_check [--incremental]
get_bazel_files_to_check() {
if [[ "$1" == "--incremental" ]]; then
get_changed_files_from_master_branch -- 'BUILD' '*.bazel' '*.bzl'
get_changed_files_from_master_branch -- '*BUILD' '*.bazel' '*.bzl'
elif [[ -z "$1" ]]; then
find . -name 'BUILD' -o -name '*.bazel' -o -name '*.bzl'
else
Expand Down