aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar Jianwei Xie <xiejw0217@gmail.com>2018-03-29 11:12:41 -0700
committerGravatar Jianwei Xie <xiejw0217@gmail.com>2018-03-29 11:12:41 -0700
commit4336e0c05b68c5e978a06cf4c4ae3459a64ba94d (patch)
tree4fc3e23a853d80aeb22777165a9fc4b9c0b06a76 /third_party
parent86868a156860877fc6e8c3393baf4942b6b7dbd4 (diff)
parent63dffd5a3bc4e94e74cb140cbf7a68e0e5644ad6 (diff)
Resolve conflicts.
Diffstat (limited to 'third_party')
-rw-r--r--third_party/examples/eager/spinn/spinn.py29
-rw-r--r--third_party/hadoop/BUILD12
-rw-r--r--third_party/mkl/BUILD11
-rw-r--r--third_party/mkl/mkl.BUILD6
-rw-r--r--third_party/mpi/BUILD12
-rw-r--r--third_party/sycl/BUILD12
-rw-r--r--third_party/sycl/sycl/BUILD12
7 files changed, 19 insertions, 75 deletions
diff --git a/third_party/examples/eager/spinn/spinn.py b/third_party/examples/eager/spinn/spinn.py
index f8fb6ecb0c..8a2b24aa4e 100644
--- a/third_party/examples/eager/spinn/spinn.py
+++ b/third_party/examples/eager/spinn/spinn.py
@@ -266,8 +266,7 @@ class SPINN(tf.keras.Model):
trackings.append(tracking)
if rights:
- reducer_output = self.reducer(
- lefts, right_in=rights, tracking=trackings)
+ reducer_output = self.reducer(lefts, rights, trackings)
reduced = iter(reducer_output)
for transition, stack in zip(trans, stacks):
@@ -388,10 +387,10 @@ class SNLIClassifier(tf.keras.Model):
# Run the batch-normalized and dropout-processed word vectors through the
# SPINN encoder.
- premise = self.encoder(
- premise_embed, transitions=premise_transition, training=training)
- hypothesis = self.encoder(
- hypothesis_embed, transitions=hypothesis_transition, training=training)
+ premise = self.encoder(premise_embed, premise_transition,
+ training=training)
+ hypothesis = self.encoder(hypothesis_embed, hypothesis_transition,
+ training=training)
# Combine encoder outputs for premises and hypotheses into logits.
# Then apply batch normalization and dropuout on the logits.
@@ -465,11 +464,10 @@ class SNLIClassifierTrainer(tfe.Checkpointable):
"""
with tfe.GradientTape() as tape:
tape.watch(self._model.variables)
- # TODO(allenl): Allow passing Layer inputs as position arguments.
logits = self._model(premise,
- premise_transition=premise_transition,
- hypothesis=hypothesis,
- hypothesis_transition=hypothesis_transition,
+ premise_transition,
+ hypothesis,
+ hypothesis_transition,
training=True)
loss = self.loss(labels, logits)
gradients = tape.gradient(loss, self._model.variables)
@@ -533,9 +531,7 @@ def _evaluate_on_dataset(snli_data, batch_size, trainer, use_gpu):
snli_data, batch_size):
if use_gpu:
label, prem, hypo = label.gpu(), prem.gpu(), hypo.gpu()
- logits = trainer.model(
- prem, premise_transition=prem_trans, hypothesis=hypo,
- hypothesis_transition=hypo_trans, training=False)
+ logits = trainer.model(prem, prem_trans, hypo, hypo_trans, training=False)
loss_val = trainer.loss(label, logits)
batch_size = tf.shape(label)[0]
mean_loss(loss_val, weights=batch_size.gpu() if use_gpu else batch_size)
@@ -639,11 +635,8 @@ def train_or_infer_spinn(embed,
hypo, hypo_trans = inference_sentence_pair[1]
hypo_trans = inference_sentence_pair[1][1]
inference_logits = model(
- tf.constant(prem),
- premise_transition=tf.constant(prem_trans),
- hypothesis=tf.constant(hypo),
- hypothesis_transition=tf.constant(hypo_trans),
- training=False)
+ tf.constant(prem), tf.constant(prem_trans),
+ tf.constant(hypo), tf.constant(hypo_trans), training=False)
inference_logits = inference_logits[0][1:]
max_index = tf.argmax(inference_logits)
print("\nInference logits:")
diff --git a/third_party/hadoop/BUILD b/third_party/hadoop/BUILD
index 9e98154400..c3c5e428be 100644
--- a/third_party/hadoop/BUILD
+++ b/third_party/hadoop/BUILD
@@ -4,18 +4,6 @@ licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE.txt"])
-filegroup(
- name = "all_files",
- srcs = glob(
- ["**/*"],
- exclude = [
- "**/METADATA",
- "**/OWNERS",
- ],
- ),
- visibility = ["//tensorflow:__subpackages__"],
-)
-
cc_library(
name = "hdfs",
hdrs = ["hdfs.h"],
diff --git a/third_party/mkl/BUILD b/third_party/mkl/BUILD
index 3262562bcc..c2adf578c7 100644
--- a/third_party/mkl/BUILD
+++ b/third_party/mkl/BUILD
@@ -24,7 +24,6 @@ load(
filegroup(
name = "LICENSE",
- visibility = ["//visibility:public"],
srcs = ["MKL_LICENSE"] + select({
"@org_tensorflow//tensorflow:linux_x86_64": [
"@mkl_linux//:LICENSE",
@@ -34,13 +33,13 @@ filegroup(
],
"@org_tensorflow//tensorflow:windows": [
"@mkl_windows//:LICENSE",
- ]
- })
+ ],
+ }),
+ visibility = ["//visibility:public"],
)
cc_library(
name = "intel_binary_blob",
-
visibility = ["//visibility:public"],
deps = select({
"@org_tensorflow//tensorflow:linux_x86_64": [
@@ -54,6 +53,6 @@ cc_library(
"@org_tensorflow//tensorflow:windows": [
"@mkl_windows//:mkl_headers",
"@mkl_windows//:mkl_libs_windows",
- ]
- })
+ ],
+ }),
)
diff --git a/third_party/mkl/mkl.BUILD b/third_party/mkl/mkl.BUILD
index 892221ec00..c3a71e4ff9 100644
--- a/third_party/mkl/mkl.BUILD
+++ b/third_party/mkl/mkl.BUILD
@@ -21,7 +21,7 @@ cc_library(
name = "mkl_libs_linux",
srcs = [
"lib/libiomp5.so",
- "lib/libmklml_intel.so"
+ "lib/libmklml_intel.so",
],
visibility = ["//visibility:public"],
)
@@ -30,7 +30,7 @@ cc_library(
name = "mkl_libs_darwin",
srcs = [
"lib/libiomp5.dylib",
- "lib/libmklml.dylib"
+ "lib/libmklml.dylib",
],
visibility = ["//visibility:public"],
)
@@ -39,7 +39,7 @@ cc_library(
name = "mkl_libs_windows",
srcs = [
"lib/libiomp5md.lib",
- "lib/mklml.lib"
+ "lib/mklml.lib",
],
visibility = ["//visibility:public"],
)
diff --git a/third_party/mpi/BUILD b/third_party/mpi/BUILD
index ff3f437e92..1d6ac2fceb 100644
--- a/third_party/mpi/BUILD
+++ b/third_party/mpi/BUILD
@@ -1,17 +1,5 @@
licenses(["restricted"])
-filegroup(
- name = "all_files",
- srcs = glob(
- ["**/*"],
- exclude = [
- "**/METADATA",
- "**/OWNERS",
- ],
- ),
- visibility = ["//tensorflow:__subpackages__"],
-)
-
load("//third_party/mpi:mpi.bzl", "mpi_hdr")
load("//third_party/mpi:mpi.bzl", "if_mpi")
diff --git a/third_party/sycl/BUILD b/third_party/sycl/BUILD
index fbdf19f205..f631b6df06 100644
--- a/third_party/sycl/BUILD
+++ b/third_party/sycl/BUILD
@@ -1,15 +1,3 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
-
-filegroup(
- name = "all_files",
- srcs = glob(
- ["**/*"],
- exclude = [
- "**/METADATA",
- "**/OWNERS",
- ],
- ),
- visibility = ["//tensorflow:__subpackages__"],
-)
diff --git a/third_party/sycl/sycl/BUILD b/third_party/sycl/sycl/BUILD
index bc1d18b7b5..b045609954 100644
--- a/third_party/sycl/sycl/BUILD
+++ b/third_party/sycl/sycl/BUILD
@@ -5,15 +5,3 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
-
-filegroup(
- name = "all_files",
- srcs = glob(
- ["**/*"],
- exclude = [
- "**/METADATA",
- "**/OWNERS",
- ],
- ),
- visibility = ["//tensorflow:__subpackages__"],
-)