summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application-preprocessor/pom.xml5
-rw-r--r--application-preprocessor/src/main/java/com/yahoo/application/preprocessor/ApplicationPreprocessor.java2
-rw-r--r--config-application-package/pom.xml5
-rw-r--r--config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java17
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/MacroShadower.java2
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java12
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/admin/Admin.java12
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/admin/LogForwarder.java4
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java8
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTensorFlowTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/admin/DedicatedAdminV4Test.java6
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java4
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java11
-rw-r--r--docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java197
-rw-r--r--docker-api/src/test/resources/systest/Dockerfile.template10
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/Timer.java8
-rw-r--r--node-admin/pom.xml5
-rw-r--r--node-admin/src/main/application/services.xml5
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/AdminComponent.java7
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/IdempotentTask.java21
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/TaskComponent.java17
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/TaskContext.java21
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/io/FileSystemPath.java68
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/DockerAdminComponent.java14
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminConfig.java8
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminMain.java81
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdaterImpl.java (renamed from node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdater.java)17
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/provider/NodeAdminProvider.java5
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/provider/NodeAdminStateUpdater.java17
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/restapi/RestApiHandler.java4
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/MakeDirectoryTask.java49
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/Task.java17
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/WriteFileTask.java80
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/FileWriter.java61
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/IOExceptionUtil.java34
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPath.java (renamed from node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/io/FileSystem.java)65
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/package-info.java5
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/AddYumRepo.java (renamed from node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/AddYumRepoTask.java)33
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/package-info.java (renamed from node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/package-info.java)2
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java42
-rw-r--r--node-admin/src/main/resources/configdefinitions/config-server.def20
-rwxr-xr-xnode-admin/src/main/sh/node-admin.sh11
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerTester.java6
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RebootTest.java5
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RunInContainerTest.java9
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/io/FileSystemTest.java81
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdaterImplTest.java (renamed from node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdaterTest.java)9
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/AddYumRepoTaskTest.java70
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/MakeDirectoryTaskTest.java49
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/TaskTestBase.java26
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/WriteFileTaskTest.java80
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/FileWriterTest.java51
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/TestFileSystem.java24
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPathTest.java65
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/AddYumRepoTest.java57
-rw-r--r--parent/pom.xml6
-rw-r--r--searchcommon/src/vespa/searchcommon/common/growstrategy.h35
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp4
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_test.cpp12
-rw-r--r--searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp12
-rw-r--r--searchcore/src/tests/proton/attribute/imported_attributes_repo/imported_attributes_repo_test.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/config/proton.def4
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp21
-rw-r--r--searchlib/CMakeLists.txt1
-rwxr-xr-xsearchlib/src/main/java/com/yahoo/searchlib/rankingexpression/RankingExpression.java36
-rw-r--r--searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/OperationMapper.java373
-rw-r--r--searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorConverter.java59
-rw-r--r--searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowImporter.java55
-rw-r--r--searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowModel.java7
-rwxr-xr-xsearchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java2
-rwxr-xr-xsearchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java2
-rw-r--r--searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TensorFunctionNode.java4
-rwxr-xr-xsearchlib/src/main/javacc/RankingExpressionParser.jj45
-rw-r--r--searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/saved_model.pbtxt8550
-rw-r--r--searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/variables/variables.data-00000-of-00001bin1080200 -> 0 bytes
-rw-r--r--searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/variables/variables.indexbin371 -> 0 bytes
-rw-r--r--searchlib/src/test/files/integration/tensorflow/batch_norm/batch_normalization_mnist.py (renamed from searchlib/src/test/files/integration/tensorflow/3_layer_mnist/mnist.py)54
-rw-r--r--searchlib/src/test/files/integration/tensorflow/batch_norm/saved/saved_model.pbtxt32648
-rw-r--r--searchlib/src/test/files/integration/tensorflow/batch_norm/saved/variables/variables.data-00000-of-00001bin0 -> 1073000 bytes
-rw-r--r--searchlib/src/test/files/integration/tensorflow/batch_norm/saved/variables/variables.indexbin0 -> 686 bytes
-rw-r--r--searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorflowImportTestCase.java188
-rw-r--r--searchlib/src/tests/attribute/attribute_test.cpp10
-rw-r--r--searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp98
-rw-r--r--searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp10
-rw-r--r--searchlib/src/tests/attribute/searchcontext/searchcontext.cpp4
-rw-r--r--searchlib/src/tests/datastore/array_store/array_store_test.cpp6
-rw-r--r--searchlib/src/tests/datastore/array_store_config/array_store_config_test.cpp27
-rw-r--r--searchlib/src/tests/datastore/buffer_type/CMakeLists.txt8
-rw-r--r--searchlib/src/tests/datastore/buffer_type/FILES1
-rw-r--r--searchlib/src/tests/datastore/buffer_type/buffer_type_test.cpp116
-rw-r--r--searchlib/src/tests/datastore/datastore/datastore_test.cpp36
-rw-r--r--searchlib/src/tests/memoryindex/datastore/wordstore_test.cpp19
-rw-r--r--searchlib/src/vespa/searchlib/attribute/CMakeLists.txt1
-rw-r--r--searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_factory.cpp51
-rw-r--r--searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_factory.h41
-rw-r--r--searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.h1
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp4
-rw-r--r--searchlib/src/vespa/searchlib/datastore/array_store.h3
-rw-r--r--searchlib/src/vespa/searchlib/datastore/array_store.hpp11
-rw-r--r--searchlib/src/vespa/searchlib/datastore/array_store_config.cpp7
-rw-r--r--searchlib/src/vespa/searchlib/datastore/array_store_config.h11
-rw-r--r--searchlib/src/vespa/searchlib/datastore/buffer_type.cpp60
-rw-r--r--searchlib/src/vespa/searchlib/datastore/buffer_type.h18
-rw-r--r--searchlib/src/vespa/searchlib/datastore/unique_store.hpp3
-rw-r--r--searchlib/src/vespa/searchlib/tensor/CMakeLists.txt2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.cpp72
-rw-r--r--searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h39
-rw-r--r--searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector_read_guard.cpp53
-rw-r--r--searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector_read_guard.h37
-rw-r--r--searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h21
-rwxr-xr-xstandalone-container/src/main/sh/standalone-container.sh21
-rw-r--r--storage/src/tests/storageserver/bouncertest.cpp5
-rw-r--r--storage/src/vespa/storage/storageserver/CMakeLists.txt1
-rw-r--r--storage/src/vespa/storage/storageserver/bouncer.cpp18
-rw-r--r--storage/src/vespa/storage/storageserver/bouncer.h10
-rw-r--r--storage/src/vespa/storage/storageserver/bouncer_metrics.cpp16
-rw-r--r--storage/src/vespa/storage/storageserver/bouncer_metrics.h16
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java1
-rw-r--r--vespajlib/src/main/java/com/yahoo/path/Path.java50
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/functions/ScalarFunctions.java58
125 files changed, 34745 insertions, 9915 deletions
diff --git a/application-preprocessor/pom.xml b/application-preprocessor/pom.xml
index 6ffff09e548..b26f9d55d7e 100644
--- a/application-preprocessor/pom.xml
+++ b/application-preprocessor/pom.xml
@@ -50,6 +50,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>yolean</artifactId>
<version>${project.version}</version>
diff --git a/application-preprocessor/src/main/java/com/yahoo/application/preprocessor/ApplicationPreprocessor.java b/application-preprocessor/src/main/java/com/yahoo/application/preprocessor/ApplicationPreprocessor.java
index 73110a06151..79ed538c57d 100644
--- a/application-preprocessor/src/main/java/com/yahoo/application/preprocessor/ApplicationPreprocessor.java
+++ b/application-preprocessor/src/main/java/com/yahoo/application/preprocessor/ApplicationPreprocessor.java
@@ -60,7 +60,7 @@ public class ApplicationPreprocessor {
try {
preprocessor.run();
System.out.println("Application preprocessed successfully. Preprocessed application stored in " +
- new File(applicationDir, ".preprocessed").getAbsolutePath());
+ new File(applicationDir, FilesApplicationPackage.preprocessed).getAbsolutePath());
} catch (Exception e) {
System.err.println("Error validating application package: " + Exceptions.toMessageString(e));
System.exit(1);
diff --git a/config-application-package/pom.xml b/config-application-package/pom.xml
index 629c02de1e8..416e59d3633 100644
--- a/config-application-package/pom.xml
+++ b/config-application-package/pom.xml
@@ -39,6 +39,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>defaults</artifactId>
<version>${project.version}</version>
diff --git a/config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java b/config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java
index 3388261c798..391d284a325 100644
--- a/config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java
+++ b/config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java
@@ -59,6 +59,17 @@ import static com.yahoo.text.Lowercase.toLowerCase;
*/
public class FilesApplicationPackage implements ApplicationPackage {
+ /**
+ * The name of the subdirectory (below the original application package root)
+ * where a preprocessed version of this application package is stored.
+ * As it happens, the config model is first created with an application package in this subdirectory,
+ * and later used backed by an application package which is not in this subdirectory.
+ * To enable model code to correct for this, this constant must be publicly known.
+ *
+ * All of this stuff is Very Unfortunate and should be fixed. -Jon
+ */
+ public static final String preprocessed = ".preprocessed";
+
private static final Logger log = Logger.getLogger(FilesApplicationPackage.class.getName());
private static final String META_FILE_NAME = ".applicationMetaData";
@@ -86,7 +97,7 @@ public class FilesApplicationPackage implements ApplicationPackage {
* @return an Application package instance
*/
public static FilesApplicationPackage fromFile(File appDir, boolean includeSourceFiles) {
- return new Builder(appDir).preprocessedDir(new File(appDir, ".preprocessed"))
+ return new Builder(appDir).preprocessedDir(new File(appDir, preprocessed))
.includeSourceFiles(includeSourceFiles)
.build();
}
@@ -665,7 +676,7 @@ public class FilesApplicationPackage implements ApplicationPackage {
@Override
public ApplicationPackage preprocess(Zone zone, DeployLogger logger) throws IOException, TransformerException, ParserConfigurationException, SAXException {
IOUtils.recursiveDeleteDir(preprocessedDir);
- IOUtils.copyDirectory(appDir, preprocessedDir, -1, (dir, name) -> ! name.equals(".preprocessed") &&
+ IOUtils.copyDirectory(appDir, preprocessedDir, -1, (dir, name) -> ! name.equals(preprocessed) &&
! name.equals(SERVICES) &&
! name.equals(HOSTS) &&
! name.equals(CONFIG_DEFINITIONS_DIR));
@@ -786,7 +797,7 @@ public class FilesApplicationPackage implements ApplicationPackage {
}
public FilesApplicationPackage build() {
- return new FilesApplicationPackage(appDir, preprocessedDir.orElse(new File(appDir, ".preprocessed")),
+ return new FilesApplicationPackage(appDir, preprocessedDir.orElse(new File(appDir, preprocessed)),
metaData.orElse(readMetaData(appDir)), includeSourceFiles);
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/MacroShadower.java b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/MacroShadower.java
index 563be8b0242..758d2b2a87d 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/MacroShadower.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/MacroShadower.java
@@ -41,7 +41,7 @@ public class MacroShadower extends ExpressionTransformer<RankProfileTransformCon
return node;
}
- protected ExpressionNode transformFunctionNode(FunctionNode function, RankProfileTransformContext context) {
+ private ExpressionNode transformFunctionNode(FunctionNode function, RankProfileTransformContext context) {
String name = function.getFunction().toString();
RankProfile.Macro macro = context.rankProfile().getMacros().get(name);
if (macro == null) {
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java
index d6b758daaf4..c16d12f76d1 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java
@@ -4,6 +4,7 @@ package com.yahoo.searchdefinition.expressiontransforms;
import com.google.common.base.Joiner;
import com.yahoo.config.application.api.ApplicationFile;
import com.yahoo.config.application.api.ApplicationPackage;
+import com.yahoo.config.model.application.provider.FilesApplicationPackage;
import com.yahoo.io.IOUtils;
import com.yahoo.path.Path;
import com.yahoo.searchdefinition.RankProfile;
@@ -89,6 +90,7 @@ public class TensorFlowFeatureConverter extends ExpressionTransformer<RankProfil
store.writeConverted(expression);
model.constants().forEach((k, v) -> transformConstant(store, profile, k, v));
+
return expression.getRoot();
}
@@ -253,13 +255,9 @@ public class TensorFlowFeatureConverter extends ExpressionTransformer<RankProfil
// "tbf" ending for "typed binary format" - recognized by the nodes receiving the file:
Path constantPath = constantsPath.append(name + ".tbf");
Path constantPathCorrected = constantPath;
- if (application.getFileReference(Path.fromString("")).getAbsolutePath().endsWith(".preprocessed")) {
- log.info("Correcting TensorFlow constant path by prepending .preprocessed - alternative 1");
- constantPathCorrected = Path.fromString(".preprocessed").append(constantPath);
- }
- else if (application.getFileReference(Path.fromString("")).getAbsolutePath().endsWith(".preprocessed")) {
- log.info("Correcting TensorFlow constant path by prepending .preprocessed - alternative 2");
- constantPathCorrected = Path.fromString(".preprocessed").append(constantPath);
+ if (application.getFileReference(Path.fromString("")).getAbsolutePath().endsWith(FilesApplicationPackage.preprocessed)
+ && ! constantPath.elements().contains(FilesApplicationPackage.preprocessed)) {
+ constantPathCorrected = Path.fromString(FilesApplicationPackage.preprocessed).append(constantPath);
}
// Remember the constant in a file we replicate in ZooKeeper
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/Admin.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/Admin.java
index 071b3090f99..eaa4f18e35a 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/admin/Admin.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/Admin.java
@@ -48,6 +48,11 @@ public class Admin extends AbstractConfigProducer implements Serializable {
private final List<Slobrok> slobroks = new ArrayList<>();
private Configserver defaultConfigserver;
private Logserver logserver;
+ private LogForwarder.Config logForwarderConfig = null;
+
+ public void setLogForwarderConfig(LogForwarder.Config cfg) {
+ this.logForwarderConfig = cfg;
+ }
/**
* The single cluster controller cluster shared by all content clusters by default when not multitenant.
@@ -186,6 +191,9 @@ public class Admin extends AbstractConfigProducer implements Serializable {
addLogd(host);
addConfigProxy(host);
addFileDistribution(host);
+ if (logForwarderConfig != null) {
+ addLogForwarder(host);
+ }
}
private void addConfigSentinel(HostResource host, ApplicationId applicationId, Zone zone) {
@@ -194,6 +202,10 @@ public class Admin extends AbstractConfigProducer implements Serializable {
host.getHost().setConfigSentinel(configSentinel);
}
+ private void addLogForwarder(HostResource host) {
+ addAndInitializeService(host, new LogForwarder(host.getHost(), logForwarderConfig));
+ }
+
private void addLogd(HostResource host) {
addAndInitializeService(host, new Logd(host.getHost()));
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/LogForwarder.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/LogForwarder.java
index 4f766732e4e..2693a4c7409 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/admin/LogForwarder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/LogForwarder.java
@@ -37,8 +37,8 @@ public class LogForwarder extends AbstractService implements LogforwarderConfig.
* Creates a new LogForwarder instance.
*/
// TODO: Use proper types?
- public LogForwarder(AbstractConfigProducer parent, int index, Config config) {
- super(parent, "logforwarder." + index);
+ public LogForwarder(AbstractConfigProducer parent, Config config) {
+ super(parent, "logforwarder");
this.config = config;
setProp("clustertype", "hosts");
setProp("clustername", "admin");
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java
index b9903ccd163..83e905929d2 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java
@@ -120,18 +120,12 @@ public abstract class DomAdminBuilderBase extends VespaDomBuilder.DomConfigProdu
void addLogForwarders(ModelElement logForwardingElement, Admin admin) {
if (logForwardingElement == null) return;
- int i = 0;
for (ModelElement e : logForwardingElement.getChildren("splunk")) {
LogForwarder.Config cfg = LogForwarder.cfg()
.withSplunkHome(e.getStringAttribute("splunk-home"))
.withDeploymentServer(e.getStringAttribute("deployment-server"))
.withClientName(e.getStringAttribute("client-name"));
- for (HostResource host : admin.getHostSystem().getHosts()) {
- LogForwarder logForwarder = new LogForwarder(admin, i, cfg);
- logForwarder.setHostResource(host);
- logForwarder.initService();
- i++;
- }
+ admin.setLogForwarderConfig(cfg);
}
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTensorFlowTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTensorFlowTestCase.java
index b2147c16c6e..89f1a9f785c 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTensorFlowTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTensorFlowTestCase.java
@@ -40,7 +40,7 @@ import static org.junit.Assert.fail;
public class RankingExpressionWithTensorFlowTestCase {
private final Path applicationDir = Path.fromString("src/test/integration/tensorflow/");
- private final String vespaExpression = "join(rename(reduce(join(Placeholder, rename(constant(Variable), (d0, d1), (d1, d3)), f(a,b)(a * b)), sum, d1), d3, d1), rename(constant(Variable_1), d0, d1), f(a,b)(a + b))";
+ private final String vespaExpression = "join(rename(reduce(join(Placeholder, rename(constant(\"Variable\"), (d0, d1), (d1, d3)), f(a,b)(a * b)), sum, d1), d3, d1), rename(constant(\"Variable_1\"), d0, d1), f(a,b)(a + b))";
@After
public void removeGeneratedConstantTensorFiles() {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java
index fed9000f72b..223b50dd180 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java
@@ -270,7 +270,7 @@ public class AdminTestCase {
Set<String> configIds = vespaModel.getConfigIds();
// 1 logforwarder on each host
- assertTrue(configIds.toString(), configIds.contains("admin/logforwarder.0"));
+ assertTrue(configIds.toString(), configIds.contains("hosts/myhost0/logforwarder"));
}
@Test
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/admin/DedicatedAdminV4Test.java b/config-model/src/test/java/com/yahoo/vespa/model/admin/DedicatedAdminV4Test.java
index 4c09fd8d713..999ebd8ad4e 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/admin/DedicatedAdminV4Test.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/admin/DedicatedAdminV4Test.java
@@ -170,12 +170,12 @@ public class DedicatedAdminV4Test {
Set<String> configIds = model.getConfigIds();
// 1 logforwarder on each host
- IntStream.of(0, 1, 2).forEach(i -> assertTrue(configIds.toString(), configIds.contains("admin/logforwarder." + i)));
+ IntStream.of(0, 1, 2).forEach(i -> assertTrue(configIds.toString(), configIds.contains("hosts/myhost"+i+"/logforwarder")));
// First forwarder
{
LogforwarderConfig.Builder builder = new LogforwarderConfig.Builder();
- model.getConfig(builder, "admin/logforwarder.0");
+ model.getConfig(builder, "hosts/myhost0/logforwarder");
LogforwarderConfig config = new LogforwarderConfig(builder);
assertEquals("foo:123", config.deploymentServer());
@@ -186,7 +186,7 @@ public class DedicatedAdminV4Test {
// Other host's forwarder
{
LogforwarderConfig.Builder builder = new LogforwarderConfig.Builder();
- model.getConfig(builder, "admin/logforwarder.2");
+ model.getConfig(builder, "hosts/myhost2/logforwarder");
LogforwarderConfig config = new LogforwarderConfig(builder);
assertEquals("foo:123", config.deploymentServer());
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java
index af809bea127..59a0bb2e3de 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java
@@ -24,7 +24,7 @@ public class LocalSessionRepo extends SessionRepo<LocalSession> {
private static final Logger log = Logger.getLogger(LocalSessionRepo.class.getName());
private static final FilenameFilter sessionApplicationsFilter = (dir, name) -> name.matches("\\d+");
- private static final Duration delay = Duration.ofMinutes(1);
+ private static final Duration delay = Duration.ofMinutes(5);
private final ScheduledExecutorService purgeOldSessionsExecutor = new ScheduledThreadPoolExecutor(1);
private final long sessionLifetime; // in seconds
@@ -65,6 +65,7 @@ public class LocalSessionRepo extends SessionRepo<LocalSession> {
// public for testing
public void purgeOldSessions() {
+ log.log(LogLevel.INFO, "Purging old sessions"); // TODO: Use debug level after 2018-01-29
try {
List<LocalSession> sessions = new ArrayList<>(listSessions());
for (LocalSession candidate : sessions) {
@@ -76,6 +77,7 @@ public class LocalSessionRepo extends SessionRepo<LocalSession> {
} catch (Throwable e) {
log.log(LogLevel.WARNING, "Error when purging old sessions ", e);
}
+ log.log(LogLevel.INFO, "Done purging old sessions"); // TODO: Use debug level after 2018-01-29
}
private boolean hasExpired(LocalSession candidate) {
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java
index 7304daeee1d..717be040a9f 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/noderepository/NodeRepositoryNode.java
@@ -51,6 +51,8 @@ public class NodeRepositoryNode {
private Boolean hardwareFailure;
@JsonProperty("hardwareFailureDescription")
private String hardwareFailureDescription;
+ @JsonProperty("hardwareDivergence")
+ private String hardwareDivergence;
@JsonProperty("environment")
private NodeEnvironment environment;
@JsonProperty("type")
@@ -236,6 +238,14 @@ public class NodeRepositoryNode {
return hardwareFailureDescription;
}
+ public void setHardwareDivergence(String hardwareDivergence) {
+ this.hardwareDivergence = hardwareDivergence;
+ }
+
+ public String getHardwareDivergence() {
+ return hardwareDivergence;
+ }
+
public void setHardwareFailureDescription(String hardwareFailureDescription) {
this.hardwareFailureDescription = hardwareFailureDescription;
}
@@ -369,6 +379,7 @@ public class NodeRepositoryNode {
", failCount=" + failCount +
", hardwareFailure=" + hardwareFailure +
", hardwareFailureDescription='" + hardwareFailureDescription + '\'' +
+ ", hardwareDivergence='" + hardwareDivergence + '\'' +
", environment=" + environment +
", type=" + type +
", wantedDockerImage='" + wantedDockerImage + '\'' +
diff --git a/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java b/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java
deleted file mode 100644
index 715c839e531..00000000000
--- a/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.dockerapi;
-
-import com.github.dockerjava.api.command.ExecCreateCmdResponse;
-import com.github.dockerjava.api.command.ExecStartCmd;
-import com.github.dockerjava.api.command.InspectExecResponse;
-import com.github.dockerjava.core.command.ExecStartResultCallback;
-import static com.yahoo.vespa.defaults.Defaults.getDefaults;
-import com.yahoo.system.ProcessExecuter;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Collections;
-import java.util.List;
-import java.util.Optional;
-import java.util.concurrent.ExecutionException;
-import java.util.logging.Logger;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * <pre>
- * Requires docker daemon, see node-admin/README.md for how to install and configure.
- *
- * To get started:
- * 1. Add system test host hostnames to /etc/hosts:
- * $ sudo ./vespa/node-admin/scripts/etc-hosts.sh
- *
- *
- * Example usage:
- DockerImage vespaDockerBase = new DockerImage("docker-registry.domain.tld:8080/vespa/ci:6.52.35");
- Path pathToSystemtestsInHost = Paths.get("/home/valerijf/dev/systemtests");
- RunSystemTests runSystemTests = new RunSystemTests(vespaDockerBase, pathToSystemtestsInHost);
-
- ContainerName systemtestsHost = new ContainerName("stest-1");
- // Update maven local repository and $VESPA_HOME/lib/jars with the current version of these modules inside container
- runSystemTests.updateContainerMavenLocalRepository(systemtestsHost);
-
- Path systemTestToRun = Paths.get("tests/search/basicsearch/basic_search.rb");
- runSystemTests.runSystemTest(systemtestsHost, systemTestToRun);
- * </pre>
- *
- * @author freva
- */
-public class RunSystemTests {
- private static final DockerImage SYSTEMTESTS_DOCKER_IMAGE = new DockerImage("vespa-systest:latest");
-
- private final DockerImpl docker;
- private final DockerImage vespaBaseImage;
- private final Path pathToSystemtestsInHost;
- private final Path pathToSystemtestsInContainer = Paths.get("/systemtests");
- private final Path pathToVespaRepoInHost = Paths.get("").toAbsolutePath();
- private final Path pathToVespaRepoInContainer = Paths.get("/vespa");
- private final Path pathToTestRunner = pathToSystemtestsInContainer.resolve("bin/run_test.rb");
- private final Path pathToLibJars = Paths.get(getDefaults().underVespaHome("lib/jars"));
- private final String username = System.getProperty("user.name");
-
- private final Logger logger = Logger.getLogger("systemtest");
-
- public RunSystemTests(DockerImage vespaBaseImage, Path pathToSystemtestsInHost) {
- this.docker = DockerTestUtils.getDocker();
- this.vespaBaseImage = vespaBaseImage;
- this.pathToSystemtestsInHost = pathToSystemtestsInHost;
- }
-
- /**
- * @param systemtestHost name of the container that will execute the test, if it does not exist, a new
- * one will be started.
- * @param systemtestToRun relative path from the root of systemtests to the test to run, f.ex.
- * tests/search/basicsearch/basic_search.rb
- */
- void runSystemTest(ContainerName systemtestHost, Path systemtestToRun, String... arguments) throws InterruptedException, ExecutionException, IOException {
- runSystemTest(Collections.singletonList(systemtestHost), systemtestToRun, arguments);
- }
-
- /**
- * @param systemtestHosts name of the containers that will be used in the test, if some of them doe not exist, new
- * ones will be started. First in list will be used as system test controller
- * @param systemtestToRun relative path from the root of systemtests to the test to run, f.ex.
- * tests/search/basicsearch/basic_search.rb
- */
- void runSystemTest(List<ContainerName> systemtestHosts, Path systemtestToRun, String... arguments) throws InterruptedException, ExecutionException, IOException {
- for (ContainerName systemtestHost : systemtestHosts) {
- startSystemTestNodeIfNeeded(systemtestHost);
- }
-
- Path pathToSystestToRun = pathToSystemtestsInContainer.resolve(systemtestToRun);
-
- logger.info("Running test " + pathToSystestToRun);
- Integer testExitCode = runTest(systemtestHosts.get(0), pathToSystestToRun, arguments);
- assertEquals("Test did not finish with exit code 0", Integer.valueOf(0), testExitCode);
- }
-
- /**
- * This method updates container's local repository with all artifacts that are built on host machine, then
- * copies any existing and updated file from target to $VESPA_HOME/lib/jars.
- *
- * @param containerName name of the container to install modules in, if it does not exist, a new
- * one will be started.
- */
- void updateContainerMavenLocalRepository(ContainerName containerName) throws InterruptedException, IOException, ExecutionException {
- startSystemTestNodeIfNeeded(containerName);
-
- String sources = pathToVespaRepoInContainer.toString() + "/*/target/";
- String destination = pathToLibJars.toString() + "/";
- executeInContainer(containerName, "root","/bin/sh", "-c",
- "rsync --existing --update --recursive --times " + sources + " " + destination);
-
- executeInContainer(containerName, username, "/bin/sh", "-c", "cd " + pathToVespaRepoInContainer + ";" +
- "mvn jar:jar install:install");
- }
-
- private void startSystemTestNodeIfNeeded(ContainerName containerName) throws IOException, InterruptedException, ExecutionException {
- buildVespaSystestDockerImage(docker, vespaBaseImage);
-
- Optional<Container> container = docker.getContainer(containerName);
- if (container.isPresent()) {
- if (container.get().state.isRunning()) return;
- else docker.deleteContainer(containerName);
- }
-
- logger.info("Starting systemtests container " + containerName.asString());
- InetAddress nodeInetAddress = InetAddress.getByName(containerName.asString());
- docker.createContainerCommand(
- SYSTEMTESTS_DOCKER_IMAGE,
- ContainerResources.UNLIMITED,
- containerName,
- containerName.asString())
- .withNetworkMode(DockerImpl.DOCKER_CUSTOM_MACVLAN_NETWORK_NAME)
- .withIpAddress(nodeInetAddress)
- .withEnvironment("USER", "root")
- .withEnvironment("VESPA_SYSTEM_TEST_USE_TLS", "false")
- .withUlimit("nofile", 262_144, 262_144)
- .withUlimit("nproc", 32_768, 409_600)
- .withUlimit("core", -1, -1)
- .withVolume(Paths.get(System.getProperty("user.home")).resolve(".m2").toString(),
- Paths.get("/home/").resolve(username).resolve(".m2").toString())
- .withVolume(pathToSystemtestsInHost.toString(), pathToSystemtestsInContainer.toString())
- .withVolume(pathToVespaRepoInHost.toString(), pathToVespaRepoInContainer.toString())
- .create();
-
- docker.startContainer(containerName);
-
- String uid = new ProcessExecuter().exec(new String[]{"/bin/sh", "-c", "id -u " + username}).getSecond();
- docker.executeInContainerAsRoot(containerName, "useradd", "-u", uid.trim(), username);
-
- // TODO: Should check something to see if node_server.rb is ready
- Thread.sleep(1000);
- }
-
- private void buildVespaSystestDockerImage(Docker docker, DockerImage vespaBaseImage) throws IOException, ExecutionException, InterruptedException {
- if (docker.pullImageAsyncIfNeeded(vespaBaseImage)) {
- logger.info("Pulling " + vespaBaseImage.asString() + " (This may take a while)");
- while (docker.pullImageAsyncIfNeeded(vespaBaseImage)) {
- Thread.sleep(5000);
- }
- }
-
- Path systestBuildDirectory = pathToVespaRepoInHost.resolve("docker-api/src/test/resources/systest/");
- Path systestDockerfile = systestBuildDirectory.resolve("Dockerfile");
-
- String dockerfileTemplate = new String(Files.readAllBytes(systestBuildDirectory.resolve("Dockerfile.template")))
- .replaceAll("\\$VESPA_BASE_IMAGE", vespaBaseImage.asString());
- Files.write(systestDockerfile, dockerfileTemplate.getBytes());
-
- logger.info("Building " + SYSTEMTESTS_DOCKER_IMAGE.asString());
- docker.buildImage(systestDockerfile.toFile(), SYSTEMTESTS_DOCKER_IMAGE);
- }
-
- private Integer executeInContainer(ContainerName containerName, String runAsUser, String... args) throws InterruptedException {
- logger.info("Executing as '" + runAsUser + "' in '" + containerName.asString() + "': " + String.join(" ", args));
- ExecCreateCmdResponse response = docker.dockerClient.execCreateCmd(containerName.asString())
- .withCmd(args)
- .withAttachStdout(true)
- .withAttachStderr(true)
- .withUser(runAsUser)
- .exec();
-
- ExecStartCmd execStartCmd = docker.dockerClient.execStartCmd(response.getId());
- execStartCmd.exec(new ExecStartResultCallback(System.out, System.err)).awaitCompletion();
-
- InspectExecResponse state = docker.dockerClient.inspectExecCmd(execStartCmd.getExecId()).exec();
- return state.getExitCode();
- }
-
- private Integer runTest(ContainerName containerName, Path testToRun, String... args) throws InterruptedException {
- String[] combinedArgs = new String[args.length + 2];
- combinedArgs[0] = pathToTestRunner.toString();
- combinedArgs[1] = testToRun.toString();
- System.arraycopy(args, 0, combinedArgs, 2, args.length);
-
- return executeInContainer(containerName, "root", combinedArgs);
- }
-}
diff --git a/docker-api/src/test/resources/systest/Dockerfile.template b/docker-api/src/test/resources/systest/Dockerfile.template
deleted file mode 100644
index 4c58fefbc72..00000000000
--- a/docker-api/src/test/resources/systest/Dockerfile.template
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM $VESPA_BASE_IMAGE
-
-# Don't autostart anything when building image
-RUN yinst set root.autostart=off
-
-RUN yinst install -branch test yruby-2.3.1_1 vespa_test-$(yinst ls vespa | grep -Eo "[0-9]\.[0-9]+\.[0-9]+") vespa_systemtest_deps
-
-# Start node_server through bash to avoid zombie processes, see
-# https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/
-ENTRYPOINT ["/bin/bash", "-c", "set -e && /systemtests/bin/node_server.rb"]
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/Timer.java b/jdisc_core/src/main/java/com/yahoo/jdisc/Timer.java
index c94ebc1ab93..f0dc26844e7 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/Timer.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/Timer.java
@@ -4,6 +4,8 @@ package com.yahoo.jdisc;
import com.google.inject.ImplementedBy;
import com.yahoo.jdisc.core.SystemTimer;
+import java.time.Instant;
+
/**
* <p>This class provides access to the current time in milliseconds, as viewed by the {@link Container}. Inject an
* instance of this class into any component that needs to access time, instead of using
@@ -27,4 +29,10 @@ public interface Timer {
*/
long currentTimeMillis();
+ /**
+ * Convenience method for getting an java.util.Instance from currentTimeMillis().
+ */
+ default Instant currentTime() {
+ return Instant.ofEpochMilli(currentTimeMillis());
+ }
}
diff --git a/node-admin/pom.xml b/node-admin/pom.xml
index 983e4d3a832..7b3b787b503 100644
--- a/node-admin/pom.xml
+++ b/node-admin/pom.xml
@@ -115,6 +115,11 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.google.jimfs</groupId>
+ <artifactId>jimfs</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/node-admin/src/main/application/services.xml b/node-admin/src/main/application/services.xml
index e73c13dfa8f..da782363508 100644
--- a/node-admin/src/main/application/services.xml
+++ b/node-admin/src/main/application/services.xml
@@ -15,11 +15,6 @@
<isRunningLocally>false</isRunningLocally>
</config>
- <config name="vespa.hosted.node.admin.node-admin">
- <isRunningLocally>false</isRunningLocally>
- <restartOnDeploy>true</restartOnDeploy>
- </config>
-
<nodes type="host"/>
<preprocess:include file="variant.xml" required="false"/>
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/AdminComponent.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/AdminComponent.java
index 9bed492bd76..9888cca9c7e 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/AdminComponent.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/AdminComponent.java
@@ -1,6 +1,8 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.component;
+import com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater;
+
/**
* An AdminComponent cannot assume anything about the environment until enable()
* is called: Required YUM packages may not have been installed, services
@@ -14,6 +16,11 @@ public interface AdminComponent {
void enable();
/**
+ * @return NodeAdminStateUpdater used by the REST API
+ */
+ NodeAdminStateUpdater getNodeAdminStateUpdater();
+
+ /**
* Disable component. May be called more than once.
* Must be compatible with component deconstruct().
*/
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/IdempotentTask.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/IdempotentTask.java
new file mode 100644
index 00000000000..b6b64dbf5dd
--- /dev/null
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/IdempotentTask.java
@@ -0,0 +1,21 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.hosted.node.admin.component;
+
+/**
+ * This class is thread unsafe: All method calls MUST be exclusive and serialized.
+ */
+public interface IdempotentTask {
+ String name();
+
+ /**
+ * Execute an administrative task to converge the system towards some ideal state.
+ *
+ * converge() must be idempotent: it may be called any number of times, or
+ * interrupted at any time e.g. by `kill -9`. The caller must ensure there is at
+ * most one invocation of converge() on this instance at any given time.
+ *
+ * @return false if the system was already converged, i.e. converge() was a no-op.
+ * @throws RuntimeException (or a subclass) if the task is unable to converge.
+ */
+ boolean converge(TaskContext context);
+}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/TaskComponent.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/TaskComponent.java
new file mode 100644
index 00000000000..c54f9ee00c8
--- /dev/null
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/TaskComponent.java
@@ -0,0 +1,17 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.hosted.node.admin.component;
+
+import com.yahoo.component.ComponentId;
+import com.yahoo.component.chain.ChainedComponent;
+
+public abstract class TaskComponent extends ChainedComponent implements IdempotentTask {
+ protected TaskComponent(ComponentId id) {
+ super(id);
+ }
+
+ public String name() {
+ return getIdString();
+ }
+
+ public abstract boolean converge(TaskContext context);
+}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/TaskContext.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/TaskContext.java
new file mode 100644
index 00000000000..9def627e87f
--- /dev/null
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/component/TaskContext.java
@@ -0,0 +1,21 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.hosted.node.admin.component;
+
+import java.nio.file.FileSystem;
+import java.util.EnumSet;
+import java.util.logging.Logger;
+
+public interface TaskContext {
+ enum Cloud { YAHOO, AWS }
+ Cloud cloud();
+
+ enum Role { TENANT_DOCKER_HOST, CONFIG_SERVER_DOCKER_HOST }
+ EnumSet<Role> roles();
+ default boolean hasRole(Role role) {
+ return roles().contains(role);
+ }
+
+ FileSystem fileSystem();
+
+ void logSystemModification(Logger logger, String actionDescription);
+}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/io/FileSystemPath.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/io/FileSystemPath.java
deleted file mode 100644
index bfec341e05c..00000000000
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/io/FileSystemPath.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.io;
-
-import java.nio.file.OpenOption;
-import java.nio.file.Path;
-import java.nio.file.attribute.FileAttribute;
-
-/**
- * Convenience class for calling FileSystem methods on a fixed Path.
- */
-public class FileSystemPath {
- private final FileSystem fileSystem;
- private final Path path;
-
- FileSystemPath(FileSystem fileSystem, Path path) {
- this.fileSystem = fileSystem;
- this.path = path;
- }
-
- public boolean isDirectory() {
- return fileSystem.isDirectory(path);
- }
-
- public boolean isRegularFile() {
- return fileSystem.isRegularFile(path);
- }
-
- public FileSystemPath createDirectory(FileAttribute<?>... attributes) {
- fileSystem.createDirectory(path, attributes);
- return this;
- }
-
- public String readUtf8File() {
- return fileSystem.readUtf8File(path);
- }
-
- public FileSystemPath writeUtf8File(String content, OpenOption... options) {
- fileSystem.writeUtf8File(path, content, options);
- return this;
- }
-
- public String getPermissions() {
- return fileSystem.getPermissions(path);
- }
-
- public FileSystemPath setPermissions(String permissions) {
- fileSystem.setPermissions(path, permissions);
- return this;
- }
-
- public String getOwner() {
- return fileSystem.getOwner(path);
- }
-
- public FileSystemPath setOwner(String owner) {
- fileSystem.setOwner(path, owner);
- return this;
- }
-
- public String getGroup() {
- return fileSystem.getGroup(path);
- }
-
- public FileSystemPath setGroup(String group) {
- fileSystem.setGroup(path, group);
- return this;
- }
-}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/DockerAdminComponent.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/DockerAdminComponent.java
index 980a244484c..db0313583db 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/DockerAdminComponent.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/DockerAdminComponent.java
@@ -6,6 +6,7 @@ import com.yahoo.net.HostName;
import com.yahoo.system.ProcessExecuter;
import com.yahoo.vespa.hosted.dockerapi.Docker;
import com.yahoo.vespa.hosted.dockerapi.metrics.MetricReceiverWrapper;
+import com.yahoo.vespa.hosted.node.admin.ConfigServerConfig;
import com.yahoo.vespa.hosted.node.admin.component.AdminComponent;
import com.yahoo.vespa.hosted.node.admin.docker.DockerOperations;
import com.yahoo.vespa.hosted.node.admin.docker.DockerOperationsImpl;
@@ -17,6 +18,7 @@ import com.yahoo.vespa.hosted.node.admin.noderepository.NodeRepository;
import com.yahoo.vespa.hosted.node.admin.noderepository.NodeRepositoryImpl;
import com.yahoo.vespa.hosted.node.admin.orchestrator.Orchestrator;
import com.yahoo.vespa.hosted.node.admin.orchestrator.OrchestratorImpl;
+import com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater;
import com.yahoo.vespa.hosted.node.admin.util.ConfigServerHttpRequestExecutor;
import com.yahoo.vespa.hosted.node.admin.util.Environment;
@@ -32,6 +34,7 @@ public class DockerAdminComponent implements AdminComponent {
private static final Duration NODE_AGENT_SCAN_INTERVAL = Duration.ofSeconds(30);
private static final Duration NODE_ADMIN_CONVERGE_STATE_INTERVAL = Duration.ofSeconds(30);
+ private final ConfigServerConfig configServerConfig;
private final NodeAdminConfig config;
private final Docker docker;
private final MetricReceiverWrapper metricReceiver;
@@ -39,12 +42,14 @@ public class DockerAdminComponent implements AdminComponent {
private ConfigServerHttpRequestExecutor requestExecutor;
- private Optional<NodeAdminStateUpdater> nodeAdminStateUpdater = Optional.empty();
+ private Optional<NodeAdminStateUpdaterImpl> nodeAdminStateUpdater = Optional.empty();
- public DockerAdminComponent(NodeAdminConfig config,
+ public DockerAdminComponent(ConfigServerConfig configServerConfig,
+ NodeAdminConfig config,
Docker docker,
MetricReceiverWrapper metricReceiver,
ClassLocking classLocking) {
+ this.configServerConfig = configServerConfig;
this.config = config;
this.docker = docker;
this.metricReceiver = metricReceiver;
@@ -57,7 +62,7 @@ public class DockerAdminComponent implements AdminComponent {
return;
}
- Environment environment = new Environment();
+ Environment environment = new Environment(configServerConfig);
requestExecutor = ConfigServerHttpRequestExecutor.create(
environment.getConfigServerUris(), environment.getKeyStoreOptions(), environment.getTrustStoreOptions());
NodeRepository nodeRepository = new NodeRepositoryImpl(requestExecutor);
@@ -104,7 +109,7 @@ public class DockerAdminComponent implements AdminComponent {
metricReceiver,
clock);
- nodeAdminStateUpdater = Optional.of(new NodeAdminStateUpdater(
+ nodeAdminStateUpdater = Optional.of(new NodeAdminStateUpdaterImpl(
nodeRepository,
orchestrator,
storageMaintainer,
@@ -129,6 +134,7 @@ public class DockerAdminComponent implements AdminComponent {
// TODO: Also stop docker
}
+ @Override
public NodeAdminStateUpdater getNodeAdminStateUpdater() {
return nodeAdminStateUpdater.get();
}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminConfig.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminConfig.java
index 0be31ffdbae..df26bc2dee5 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminConfig.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminConfig.java
@@ -7,18 +7,16 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.File;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
@JsonIgnoreProperties(ignoreUnknown = true)
public class NodeAdminConfig {
private static final ObjectMapper mapper = new ObjectMapper();
/**
- * A list of components to enable instead of the default.
+ * If null, the default admin component will be used.
*/
- @JsonProperty("components")
- public List<String> components = new ArrayList<>();
+ @JsonProperty("main-component")
+ public String mainComponent = null;
public enum Mode {
aws_tenant,
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminMain.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminMain.java
index 6fd6b0c906c..3e9cb239890 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminMain.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminMain.java
@@ -8,12 +8,11 @@ import com.yahoo.log.LogLevel;
import com.yahoo.vespa.defaults.Defaults;
import com.yahoo.vespa.hosted.dockerapi.Docker;
import com.yahoo.vespa.hosted.dockerapi.metrics.MetricReceiverWrapper;
+import com.yahoo.vespa.hosted.node.admin.ConfigServerConfig;
import com.yahoo.vespa.hosted.node.admin.component.AdminComponent;
+import com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater;
import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -23,26 +22,27 @@ import java.util.stream.Collectors;
* - It will "start" (only) the necessary components.
* - Other components MUST NOT try to start (typically in constructor) since the features
* they provide is NOT WANTED and possibly destructive, and/or the environment may be
- * incompatible. For instance, trying to contact the Docker daemon too early will
- * be fatal: the node admin may not have installed and started the docker daemon.
+ * incompatible. For instance, trying to contact the Docker daemon too early will be
+ * fatal: the node admin may not have installed and started the docker daemon.
*/
public class NodeAdminMain implements AutoCloseable {
private static final Logger logger = Logger.getLogger(NodeAdminMain.class.getName());
private final ComponentRegistry<AdminComponent> adminRegistry;
+ private final ConfigServerConfig configServerConfig;
private final Docker docker;
private final MetricReceiverWrapper metricReceiver;
private final ClassLocking classLocking;
- private List<AdminComponent> enabledComponents = new ArrayList<>();
-
- private Optional<DockerAdminComponent> dockerAdmin = Optional.empty();
+ private AdminComponent mainAdminComponent = null;
public NodeAdminMain(ComponentRegistry<AdminComponent> adminRegistry,
+ ConfigServerConfig configServerConfig,
Docker docker,
MetricReceiverWrapper metricReceiver,
ClassLocking classLocking) {
this.adminRegistry = adminRegistry;
+ this.configServerConfig = configServerConfig;
this.docker = docker;
this.metricReceiver = metricReceiver;
this.classLocking = classLocking;
@@ -55,53 +55,46 @@ public class NodeAdminMain implements AutoCloseable {
public void start() {
NodeAdminConfig config = getConfig();
+ mainAdminComponent = selectAdminComponent(config);
+ mainAdminComponent.enable();
+ }
- if (config.components.isEmpty()) {
- dockerAdmin = Optional.of(new DockerAdminComponent(
- config, docker, metricReceiver, classLocking));
- enable(dockerAdmin.get());
- } else {
- logger.log(LogLevel.INFO, () -> {
- String registeredComponentsList = adminRegistry
- .allComponentsById().keySet().stream()
- .map(ComponentId::stringValue)
- .collect(Collectors.joining(", "));
-
- String requestedComponentsList = config.components.stream()
- .collect(Collectors.joining(", "));
-
- return String.format(
- "Components registered = '%s', enabled = '%s'",
- registeredComponentsList,
- requestedComponentsList);
- });
+ private AdminComponent selectAdminComponent(NodeAdminConfig config) {
+ if (config.mainComponent == null) {
+ return new DockerAdminComponent(configServerConfig, config, docker, metricReceiver, classLocking);
+ }
- for (String componentSpecificationString : config.components) {
- AdminComponent component =
- adminRegistry.getComponent(componentSpecificationString);
- if (component == null) {
- throw new IllegalArgumentException("There is no component named '" +
- componentSpecificationString + "'");
- }
- enable(component);
- }
+ logger.log(LogLevel.INFO, () -> {
+ String registeredComponentsList = adminRegistry
+ .allComponentsById().keySet().stream()
+ .map(ComponentId::stringValue)
+ .collect(Collectors.joining(", "));
+
+ return String.format(
+ "Components registered = '%s', enabled = '%s'",
+ registeredComponentsList,
+ config.mainComponent);
+ });
+
+ AdminComponent component = adminRegistry.getComponent(config.mainComponent);
+ if (component == null) {
+ throw new IllegalArgumentException("There is no component named '" +
+ config.mainComponent + "'");
}
- }
- private void enable(AdminComponent component) {
- component.enable();
- enabledComponents.add(component);
+ return component;
}
@Override
public void close() {
- int i = enabledComponents.size();
- while (i --> 0) {
- enabledComponents.remove(i).disable();
+ if (mainAdminComponent != null) {
+ mainAdminComponent.disable();
+ mainAdminComponent = null;
}
}
public NodeAdminStateUpdater getNodeAdminStateUpdater() {
- return dockerAdmin.get().getNodeAdminStateUpdater();
+ assert mainAdminComponent != null : "start() hasn't been called yet";
+ return mainAdminComponent.getNodeAdminStateUpdater();
}
}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdater.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdaterImpl.java
index 5ec041298fb..e4e66b57186 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdater.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdaterImpl.java
@@ -12,6 +12,7 @@ import com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAttributes;
import com.yahoo.vespa.hosted.node.admin.noderepository.NodeRepository;
import com.yahoo.vespa.hosted.node.admin.orchestrator.Orchestrator;
import com.yahoo.vespa.hosted.node.admin.orchestrator.OrchestratorException;
+import com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater;
import com.yahoo.vespa.hosted.node.admin.util.HttpException;
import com.yahoo.vespa.hosted.provision.Node;
@@ -32,16 +33,16 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
-import static com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdater.State.RESUMED;
-import static com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdater.State.SUSPENDED_NODE_ADMIN;
-import static com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdater.State.TRANSITIONING;
+import static com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater.State.RESUMED;
+import static com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater.State.SUSPENDED_NODE_ADMIN;
+import static com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater.State.TRANSITIONING;
/**
* Pulls information from node repository and forwards containers to run to node admin.
*
* @author dybis, stiankri
*/
-public class NodeAdminStateUpdater {
+public class NodeAdminStateUpdaterImpl implements NodeAdminStateUpdater {
static final Duration FREEZE_CONVERGENCE_TIMEOUT = Duration.ofMinutes(5);
private final AtomicBoolean terminated = new AtomicBoolean(false);
@@ -67,7 +68,7 @@ public class NodeAdminStateUpdater {
private Optional<ClassLock> classLock;
private Instant lastTick;
- public NodeAdminStateUpdater(
+ public NodeAdminStateUpdaterImpl(
NodeRepository nodeRepository,
Orchestrator orchestrator,
StorageMaintainer storageMaintainer,
@@ -111,8 +112,7 @@ public class NodeAdminStateUpdater {
return this.getClass().getSimpleName() + "@" + Integer.toString(System.identityHashCode(this));
}
- public enum State { TRANSITIONING, RESUMED, SUSPENDED_NODE_ADMIN, SUSPENDED}
-
+ @Override
public Map<String, Object> getDebugPage() {
Map<String, Object> debug = new LinkedHashMap<>();
synchronized (monitor) {
@@ -142,6 +142,7 @@ public class NodeAdminStateUpdater {
}
}
+ @Override
public boolean setResumeStateAndCheckIfResumed(State wantedState) {
synchronized (monitor) {
if (this.wantedState != wantedState) {
@@ -309,7 +310,7 @@ public class NodeAdminStateUpdater {
classLocking.interrupt();
- // First we need to stop NodeAdminStateUpdater thread to make sure no new NodeAgents are spawned
+ // First we need to stop NodeAdminStateUpdaterImpl thread to make sure no new NodeAgents are spawned
signalWorkToBeDone();
specVerifierScheduler.shutdown();
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/provider/NodeAdminProvider.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/provider/NodeAdminProvider.java
index 4543e4f62c0..a5146fcae09 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/provider/NodeAdminProvider.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/provider/NodeAdminProvider.java
@@ -7,19 +7,20 @@ import com.yahoo.concurrent.classlock.ClassLocking;
import com.yahoo.container.di.componentgraph.Provider;
import com.yahoo.vespa.hosted.dockerapi.Docker;
import com.yahoo.vespa.hosted.dockerapi.metrics.MetricReceiverWrapper;
+import com.yahoo.vespa.hosted.node.admin.ConfigServerConfig;
import com.yahoo.vespa.hosted.node.admin.component.AdminComponent;
import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminMain;
-import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdater;
public class NodeAdminProvider implements Provider<NodeAdminStateUpdater> {
private final NodeAdminMain nodeAdminMain;
@Inject
public NodeAdminProvider(ComponentRegistry<AdminComponent> adminRegistry,
+ ConfigServerConfig configServerConfig,
Docker docker,
MetricReceiverWrapper metricReceiver,
ClassLocking classLocking) {
- nodeAdminMain = new NodeAdminMain(adminRegistry, docker, metricReceiver, classLocking);
+ nodeAdminMain = new NodeAdminMain(adminRegistry, configServerConfig, docker, metricReceiver, classLocking);
nodeAdminMain.start();
}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/provider/NodeAdminStateUpdater.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/provider/NodeAdminStateUpdater.java
new file mode 100644
index 00000000000..755e1301c12
--- /dev/null
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/provider/NodeAdminStateUpdater.java
@@ -0,0 +1,17 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.hosted.node.admin.provider;
+
+import java.util.Map;
+
+public interface NodeAdminStateUpdater {
+ enum State { TRANSITIONING, RESUMED, SUSPENDED_NODE_ADMIN, SUSPENDED}
+
+ /**
+ * Set the wanted state, and return whether the current state equals it.
+ * Typically, this method should be called repeatedly until current state
+ * has converged.
+ */
+ boolean setResumeStateAndCheckIfResumed(State wantedState);
+
+ Map<String, Object> getDebugPage();
+}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/restapi/RestApiHandler.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/restapi/RestApiHandler.java
index 03217c85329..a8dcde02ca6 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/restapi/RestApiHandler.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/restapi/RestApiHandler.java
@@ -6,10 +6,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.LoggingRequestHandler;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.vespa.hosted.dockerapi.metrics.DimensionMetrics;
import com.yahoo.vespa.hosted.dockerapi.metrics.MetricReceiverWrapper;
-import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdater;
+import com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater;
import javax.inject.Inject;
import javax.ws.rs.core.MediaType;
@@ -17,7 +16,6 @@ import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
-import java.util.concurrent.Executor;
import static com.yahoo.jdisc.http.HttpRequest.Method.GET;
import static com.yahoo.jdisc.http.HttpRequest.Method.PUT;
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/MakeDirectoryTask.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/MakeDirectoryTask.java
deleted file mode 100644
index 522abb81248..00000000000
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/MakeDirectoryTask.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.task;
-
-import com.yahoo.vespa.hosted.node.admin.io.FileSystem;
-
-import java.nio.file.Path;
-
-public class MakeDirectoryTask implements Task {
- private final Path path;
- private boolean withParents = false;
-
- public MakeDirectoryTask(Path path) {
- this.path = path;
- }
-
- public MakeDirectoryTask withParents() {
- this.withParents = true;
- return this;
- }
-
- Path getPath() {
- return path;
- }
-
- boolean getWithParents() {
- return withParents;
- }
-
- private boolean makeDirectory(FileSystem fileSystem,
- Path directory,
- boolean withParents) {
- if (fileSystem.isDirectory(directory)) {
- return false;
- }
-
- if (withParents) {
- makeDirectory(fileSystem, directory.getParent(), withParents);
- }
-
- fileSystem.createDirectory(directory);
-
- return true;
- }
-
- @Override
- public boolean execute(TaskContext context) {
- return makeDirectory(context.getFileSystem(), path, withParents);
- }
-}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/Task.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/Task.java
deleted file mode 100644
index 4d40ac02440..00000000000
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/Task.java
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.task;
-
-import com.yahoo.vespa.hosted.node.admin.io.FileSystem;
-
-public interface Task {
- interface TaskContext {
- FileSystem getFileSystem();
- boolean executeSubtask(Task task);
- }
-
- /**
- * @return Returns false if task was a no-op. Used for informational purposes only.
- * @throws RuntimeException if task could not be completed.
- */
- boolean execute(TaskContext context);
-}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/WriteFileTask.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/WriteFileTask.java
deleted file mode 100644
index 308a7470d24..00000000000
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/WriteFileTask.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.task;
-
-import com.yahoo.vespa.hosted.node.admin.io.FileSystemPath;
-import org.glassfish.jersey.internal.util.Producer;
-
-import java.nio.file.Path;
-import java.util.Optional;
-
-public class WriteFileTask implements Task {
- private final Path path;
- private final Producer<String> contentProducer;
-
- private Optional<String> owner = Optional.empty();
- private Optional<String> group = Optional.empty();
- private Optional<String> permissions = Optional.empty();
-
- public WriteFileTask(Path path, Producer<String> contentProducer) {
- this.path = path;
- this.contentProducer = contentProducer;
- }
-
- public WriteFileTask withOwner(String owner) {
- this.owner = Optional.of(owner);
- return this;
- }
-
- public WriteFileTask withGroup(String group) {
- this.group = Optional.of(group);
- return this;
- }
-
- /**
- * @param permissions of the form "rwxr-x---".
- */
- public WriteFileTask withPermissions(String permissions) {
- this.permissions = Optional.of(permissions);
- return this;
- }
-
- @Override
- public boolean execute(TaskContext context) {
- final FileSystemPath fileSystemPath = context.getFileSystem().withPath(path);
-
- // TODO: Only return false if content, permission, etc would be unchanged.
- if (fileSystemPath.isRegularFile()) {
- return false;
- }
-
- context.executeSubtask(new MakeDirectoryTask(path.getParent()).withParents());
-
- String content = contentProducer.call();
- fileSystemPath.writeUtf8File(content);
- permissions.ifPresent(fileSystemPath::setPermissions);
- owner.ifPresent(fileSystemPath::setOwner);
- group.ifPresent(fileSystemPath::setGroup);
-
- return true;
- }
-
- public Path getPath() {
- return path;
- }
-
- public Producer<String> getContentProducer() {
- return contentProducer;
- }
-
- public Optional<String> getOwner() {
- return owner;
- }
-
- public Optional<String> getGroup() {
- return group;
- }
-
- public Optional<String> getPermissions() {
- return permissions;
- }
-}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/FileWriter.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/FileWriter.java
new file mode 100644
index 00000000000..60a7b3482b2
--- /dev/null
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/FileWriter.java
@@ -0,0 +1,61 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.hosted.node.admin.task.util.file;
+
+import com.yahoo.vespa.hosted.node.admin.component.TaskContext;
+import org.glassfish.jersey.internal.util.Producer;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Optional;
+import java.util.logging.Logger;
+
+public class FileWriter {
+ private static final Logger logger = Logger.getLogger(FileWriter.class.getName());
+
+ private final Path path;
+ private final Producer<String> contentProducer;
+
+ private Optional<String> owner = Optional.empty();
+ private Optional<String> group = Optional.empty();
+ private Optional<String> permissions = Optional.empty();
+
+ public FileWriter(Path path, Producer<String> contentProducer) {
+ this.path = path;
+ this.contentProducer = contentProducer;
+ }
+
+ public FileWriter withOwner(String owner) {
+ this.owner = Optional.of(owner);
+ return this;
+ }
+
+ public FileWriter withGroup(String group) {
+ this.group = Optional.of(group);
+ return this;
+ }
+
+ public FileWriter withPermissions(String permissions) {
+ this.permissions = Optional.of(permissions);
+ return this;
+ }
+
+ public boolean converge(TaskContext context) {
+ // TODO: Only return false if content, permission, etc would be unchanged.
+ if (Files.isRegularFile(path)) {
+ return false;
+ }
+
+ context.logSystemModification(logger,"Writing file " + path);
+
+ String content = contentProducer.call();
+
+ UnixPath unixPath = new UnixPath(path);
+ unixPath.createParents();
+ unixPath.writeUtf8File(content);
+ permissions.ifPresent(unixPath::setPermissions);
+ owner.ifPresent(unixPath::setOwner);
+ group.ifPresent(unixPath::setGroup);
+
+ return true;
+ }
+}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/IOExceptionUtil.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/IOExceptionUtil.java
new file mode 100644
index 00000000000..dee5525d42a
--- /dev/null
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/IOExceptionUtil.java
@@ -0,0 +1,34 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.hosted.node.admin.task.util.file;
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+
+public class IOExceptionUtil {
+ public static <T> void uncheck(RunnableThrowingIOException<T> runnable) {
+ try {
+ runnable.run();
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ }
+
+ public static <T> T uncheck(SupplierThrowingIOException<T> supplier) {
+ try {
+ return supplier.get();
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ }
+
+ @FunctionalInterface
+ public interface SupplierThrowingIOException<T> {
+ T get() throws IOException;
+ }
+
+
+ @FunctionalInterface
+ public interface RunnableThrowingIOException<T> {
+ void run() throws IOException;
+ }
+}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/io/FileSystem.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPath.java
index c5c2df9e38e..606f8cfb06e 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/io/FileSystem.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPath.java
@@ -1,5 +1,5 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.io;
+package com.yahoo.vespa.hosted.node.admin.task.util.file;
import java.io.IOException;
import java.io.UncheckedIOException;
@@ -7,7 +7,7 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.OpenOption;
import java.nio.file.Path;
-import java.nio.file.attribute.FileAttribute;
+import java.nio.file.Paths;
import java.nio.file.attribute.GroupPrincipal;
import java.nio.file.attribute.PosixFileAttributeView;
import java.nio.file.attribute.PosixFileAttributes;
@@ -15,52 +15,48 @@ import java.nio.file.attribute.PosixFilePermission;
import java.nio.file.attribute.PosixFilePermissions;
import java.nio.file.attribute.UserPrincipal;
import java.nio.file.attribute.UserPrincipalLookupService;
+import java.time.Instant;
import java.util.Set;
-/**
- * File system operations to be mocked in unit tests.
- */
-public class FileSystem {
- public FileSystemPath withPath(Path path) {
- return new FileSystemPath(this, path);
+// @Immutable
+public class UnixPath {
+ private final Path path;
+
+ public UnixPath(Path path) {
+ this.path = path;
}
- public boolean isDirectory(Path path) {
- return path.toFile().isDirectory();
+ public UnixPath(String path) {
+ this(Paths.get(path));
}
- public boolean isRegularFile(Path path) {
- return path.toFile().isFile();
+ public Path toPath() {
+ return path;
}
- public void createDirectory(Path path, FileAttribute<?>... attributes) {
- uncheck(() -> Files.createDirectory(path, attributes));
+ public void createParents() {
+ uncheck(() -> Files.createDirectories(path.getParent()));
}
- public String readUtf8File(Path path) {
+ public String readUtf8File() {
byte[] byteContent = uncheck(() -> Files.readAllBytes(path));
return new String(byteContent, StandardCharsets.UTF_8);
}
- public void writeUtf8File(Path path, String content, OpenOption... options) {
+ public void writeUtf8File(String content, OpenOption... options) {
byte[] contentInUtf8 = content.getBytes(StandardCharsets.UTF_8);
uncheck(() -> Files.write(path, contentInUtf8, options));
}
- private PosixFileAttributes getAttributes(Path path) {
- return uncheck(() ->
- Files.getFileAttributeView(path, PosixFileAttributeView.class).readAttributes());
- }
-
- public String getPermissions(Path path) {
- return PosixFilePermissions.toString(getAttributes(path).permissions());
+ public String getPermissions() {
+ return PosixFilePermissions.toString(getAttributes().permissions());
}
/**
* @param permissions Example: "rwxr-x---" means rwx for owner, rx for group,
* and no permissions for others.
*/
- public void setPermissions(Path path, String permissions) {
+ public void setPermissions(String permissions) {
Set<PosixFilePermission> permissionSet;
try {
permissionSet = PosixFilePermissions.fromString(permissions);
@@ -72,26 +68,35 @@ public class FileSystem {
uncheck(() -> Files.setPosixFilePermissions(path, permissionSet));
}
- public String getOwner(Path path) {
- return getAttributes(path).owner().getName();
+ public String getOwner() {
+ return getAttributes().owner().getName();
}
- public void setOwner(Path path, String owner) {
+ public void setOwner(String owner) {
UserPrincipalLookupService service = path.getFileSystem().getUserPrincipalLookupService();
UserPrincipal principal = uncheck(() -> service.lookupPrincipalByName(owner));
uncheck(() -> Files.setOwner(path, principal));
}
- public String getGroup(Path path) {
- return getAttributes(path).group().getName();
+ public String getGroup() {
+ return getAttributes().group().getName();
}
- public void setGroup(Path path, String group) {
+ public void setGroup(String group) {
UserPrincipalLookupService service = path.getFileSystem().getUserPrincipalLookupService();
GroupPrincipal principal = uncheck(() -> service.lookupPrincipalByGroupName(group));
uncheck(() -> Files.getFileAttributeView(path, PosixFileAttributeView.class).setGroup(principal));
}
+ public Instant getLastModifiedTime() {
+ return uncheck(() -> Files.getLastModifiedTime(path)).toInstant();
+ }
+
+ private PosixFileAttributes getAttributes() {
+ return uncheck(() ->
+ Files.getFileAttributeView(path, PosixFileAttributeView.class).readAttributes());
+ }
+
@FunctionalInterface
private interface SupplierThrowingIOException<T> {
T get() throws IOException;
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/package-info.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/package-info.java
new file mode 100644
index 00000000000..076912c073d
--- /dev/null
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/package-info.java
@@ -0,0 +1,5 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+@ExportPackage
+package com.yahoo.vespa.hosted.node.admin.task.util.file;
+
+import com.yahoo.osgi.annotation.ExportPackage;
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/AddYumRepoTask.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/AddYumRepo.java
index a2ed6a80084..9ca1c0286f9 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/AddYumRepoTask.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/AddYumRepo.java
@@ -1,11 +1,13 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.task;
+package com.yahoo.vespa.hosted.node.admin.task.util.yum;
+
+import com.yahoo.vespa.hosted.node.admin.component.TaskContext;
+import com.yahoo.vespa.hosted.node.admin.task.util.file.FileWriter;
import java.nio.file.Path;
-import java.nio.file.Paths;
import java.util.regex.Pattern;
-public class AddYumRepoTask implements Task {
+public class AddYumRepo {
private static final Pattern REPOSITORY_ID_PATTERN = Pattern.compile("^[a-zA-Z_-]+$");
private final String repositoryId; // e.g. "platform_rpms-latest"
@@ -13,10 +15,10 @@ public class AddYumRepoTask implements Task {
private final String baseurl;
private final boolean enabled;
- public AddYumRepoTask(String repositoryId,
- String name,
- String baseurl,
- boolean enabled) {
+ public AddYumRepo(String repositoryId,
+ String name,
+ String baseurl,
+ boolean enabled) {
this.repositoryId = repositoryId;
this.name = name;
this.baseurl = baseurl;
@@ -24,23 +26,18 @@ public class AddYumRepoTask implements Task {
validateRepositoryId(repositoryId);
}
- @Override
- public boolean execute(TaskContext context) {
- Path path = Paths.get("/etc/yum.repos.d",repositoryId + ".repo");
-
- if (context.getFileSystem().isRegularFile(path)) {
- return false;
- }
+ public boolean converge(TaskContext context) {
+ Path path = context.fileSystem().getPath("/etc/yum.repos.d",repositoryId + ".repo");
- WriteFileTask writeFileTask = new WriteFileTask(path, this::getRepoFileContent)
+ FileWriter fileWriter = new FileWriter(path, this::getRepoFileContent)
.withOwner("root")
.withGroup("root")
.withPermissions("rw-r--r--");
- return context.executeSubtask(writeFileTask);
+ return fileWriter.converge(context);
}
- String getRepoFileContent() {
+ private String getRepoFileContent() {
return String.join("\n",
"# This file was generated by node admin",
"# Do NOT modify this file by hand",
@@ -53,7 +50,7 @@ public class AddYumRepoTask implements Task {
) + "\n";
}
- static void validateRepositoryId(String repositoryId) {
+ private static void validateRepositoryId(String repositoryId) {
if (!REPOSITORY_ID_PATTERN.matcher(repositoryId).matches()) {
throw new IllegalArgumentException("Invalid repository ID '" + repositoryId + "'");
}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/package-info.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/package-info.java
index 433884139f6..3c5292982d0 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/package-info.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/package-info.java
@@ -1,5 +1,5 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
@ExportPackage
-package com.yahoo.vespa.hosted.node.admin.task;
+package com.yahoo.vespa.hosted.node.admin.task.util.yum;
import com.yahoo.osgi.annotation.ExportPackage;
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java
index dcde950c4d3..72996e438b7 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/Environment.java
@@ -2,8 +2,9 @@
package com.yahoo.vespa.hosted.node.admin.util;
import com.google.common.base.Strings;
-import com.yahoo.net.HostName;
+import com.yahoo.vespa.defaults.Defaults;
import com.yahoo.vespa.hosted.dockerapi.ContainerName;
+import com.yahoo.vespa.hosted.node.admin.ConfigServerConfig;
import java.net.InetAddress;
import java.net.URI;
@@ -31,15 +32,10 @@ public class Environment {
private static final DateFormat filenameFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
public static final String APPLICATION_STORAGE_CLEANUP_PATH_PREFIX = "cleanup_";
- private static final String ENV_CONFIGSERVER_SCHEME = "CONFIG_SERVER_SCHEME";
- private static final String ENV_CONFIGSERVER_HOSTS = "CONFIG_SERVER_ADDRESS";
- private static final String ENV_CONFIGSERVER_PORT = "CONFIG_SERVER_PORT";
private static final String ENVIRONMENT = "ENVIRONMENT";
private static final String REGION = "REGION";
private static final String LOGSTASH_NODES = "LOGSTASH_NODES";
private static final String COREDUMP_FEED_ENDPOINT = "COREDUMP_FEED_ENDPOINT";
- private static final String KEY_STORE_PATH = "KEY_STORE_PATH";
- private static final String TRUST_STORE_PATH = "TRUST_STORE_PATH";
private final List<URI> configServerHosts;
private final String environment;
@@ -56,19 +52,29 @@ public class Environment {
filenameFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
}
- public Environment() {
- this(getConfigServerUrlsFromEnvironment(),
+ public Environment(ConfigServerConfig configServerConfig) {
+ this(createConfigServerUris(
+ configServerConfig.scheme(),
+ configServerConfig.hosts(),
+ configServerConfig.port()),
+
getEnvironmentVariable(ENVIRONMENT),
getEnvironmentVariable(REGION),
- HostName.getLocalhost(),
+ Defaults.getDefaults().vespaHostname(),
new InetAddressResolver(),
new PathResolver(),
getLogstashNodesFromEnvironment(),
getEnvironmentVariable(COREDUMP_FEED_ENDPOINT),
- // TODO: Make key store password and type configurable
- getKeyStoreOptionsFromEnvironment(KEY_STORE_PATH, new char[0], "PKCS12"),
- getKeyStoreOptionsFromEnvironment(TRUST_STORE_PATH, "changeit".toCharArray(), "JKS"));
+ createKeyStoreOptions(
+ configServerConfig.keyStoreConfig().path(),
+ configServerConfig.keyStoreConfig().password().toCharArray(),
+ configServerConfig.keyStoreConfig().type().name()),
+ createKeyStoreOptions(
+ configServerConfig.trustStoreConfig().path(),
+ configServerConfig.trustStoreConfig().password().toCharArray(),
+ configServerConfig.trustStoreConfig().type().name())
+ );
}
public Environment(List<URI> configServerHosts,
@@ -119,12 +125,8 @@ public class Environment {
return getEnvironment() + "." + getRegion();
}
- private static List<URI> getConfigServerUrlsFromEnvironment() {
- String scheme = getEnvironmentVariable(ENV_CONFIGSERVER_SCHEME);
- String configServerHosts = getEnvironmentVariable(ENV_CONFIGSERVER_HOSTS);
- String port = getEnvironmentVariable(ENV_CONFIGSERVER_PORT);
-
- return Arrays.stream(configServerHosts.split("[,\\s]+"))
+ private static List<URI> createConfigServerUris(String scheme, List<String> configServerHosts, int port) {
+ return configServerHosts.stream()
.map(hostname -> URI.create(scheme + "://" + hostname + ":" + port))
.collect(Collectors.toList());
}
@@ -137,8 +139,8 @@ public class Environment {
return Arrays.asList(logstashNodes.split("[,\\s]+"));
}
- private static Optional<KeyStoreOptions> getKeyStoreOptionsFromEnvironment(String pathToKeyStore, char[] password, String type) {
- return Optional.ofNullable(System.getenv(pathToKeyStore))
+ private static Optional<KeyStoreOptions> createKeyStoreOptions(String pathToKeyStore, char[] password, String type) {
+ return Optional.ofNullable(pathToKeyStore)
.filter(path -> !Strings.isNullOrEmpty(path))
.map(path -> new KeyStoreOptions(Paths.get(path), password, type));
}
diff --git a/node-admin/src/main/resources/configdefinitions/config-server.def b/node-admin/src/main/resources/configdefinitions/config-server.def
new file mode 100644
index 00000000000..f43bb221107
--- /dev/null
+++ b/node-admin/src/main/resources/configdefinitions/config-server.def
@@ -0,0 +1,20 @@
+# Copyright 2018 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+namespace=vespa.hosted.node.admin
+
+hosts[] string
+port int default=8080 range=[1,65535]
+scheme string default="http"
+
+# Optional options used to authenticate config server
+athenzDomain string default=""
+serviceName string default=""
+
+# Optional options about key store to use when communicating with config server
+keyStoreConfig.path string default="" # Path to keystore
+keyStoreConfig.type enum { JKS, PEM, PKCS12 } default=JKS
+keyStoreConfig.password string default=""
+
+# Optional options about trust store to use to authenticate config server
+trustStoreConfig.path string default=""
+trustStoreConfig.type enum { JKS, PEM, PKCS12 } default=JKS
+trustStoreConfig.password string default=""
diff --git a/node-admin/src/main/sh/node-admin.sh b/node-admin/src/main/sh/node-admin.sh
index ff0ea492318..3196ff9fa32 100755
--- a/node-admin/src/main/sh/node-admin.sh
+++ b/node-admin/src/main/sh/node-admin.sh
@@ -67,16 +67,19 @@ EOF
exit 1
}
-if (( $# != 1 )); then
+if (( $# == 0 )); then
Usage
fi
-case "$1" in
+command="$1"
+shift
+
+case "$command" in
start)
- "$VESPA_HOME"/libexec/vespa/standalone-container.sh start -s node-admin -u root
+ "$VESPA_HOME"/libexec/vespa/standalone-container.sh start -s node-admin -u root "$@"
;;
stop)
- "$VESPA_HOME"/libexec/vespa/standalone-container.sh stop -s node-admin -u root
+ "$VESPA_HOME"/libexec/vespa/standalone-container.sh stop -s node-admin -u root "$@"
;;
*) Usage ;;
esac
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerTester.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerTester.java
index 7a314ff0614..3cfc67824ed 100644
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerTester.java
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerTester.java
@@ -11,7 +11,7 @@ import com.yahoo.vespa.hosted.node.admin.docker.DockerOperationsImpl;
import com.yahoo.vespa.hosted.node.admin.maintenance.acl.AclMaintainer;
import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdmin;
import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminImpl;
-import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdater;
+import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdaterImpl;
import com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgent;
import com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgentImpl;
import com.yahoo.vespa.hosted.node.admin.util.Environment;
@@ -40,7 +40,7 @@ public class DockerTester implements AutoCloseable {
final CallOrderVerifier callOrderVerifier = new CallOrderVerifier();
final Docker dockerMock = new DockerMock(callOrderVerifier);
final NodeRepoMock nodeRepositoryMock = new NodeRepoMock(callOrderVerifier);
- final NodeAdminStateUpdater nodeAdminStateUpdater;
+ final NodeAdminStateUpdaterImpl nodeAdminStateUpdater;
final NodeAdmin nodeAdmin;
private final OrchestratorMock orchestratorMock = new OrchestratorMock(callOrderVerifier);
@@ -66,7 +66,7 @@ public class DockerTester implements AutoCloseable {
Function<String, NodeAgent> nodeAgentFactory = (hostName) -> new NodeAgentImpl(hostName, nodeRepositoryMock,
orchestratorMock, dockerOperations, storageMaintainer, aclMaintainer, environment, clock, NODE_AGENT_SCAN_INTERVAL);
nodeAdmin = new NodeAdminImpl(dockerOperations, nodeAgentFactory, storageMaintainer, aclMaintainer, mr, Clock.systemUTC());
- nodeAdminStateUpdater = new NodeAdminStateUpdater(nodeRepositoryMock, orchestratorMock, storageMaintainer,
+ nodeAdminStateUpdater = new NodeAdminStateUpdaterImpl(nodeRepositoryMock, orchestratorMock, storageMaintainer,
nodeAdmin, "basehostname", clock, NODE_ADMIN_CONVERGE_STATE_INTERVAL, new ClassLocking());
nodeAdminStateUpdater.start();
}
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RebootTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RebootTest.java
index 0b5d67dd13c..2db93ba4203 100644
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RebootTest.java
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RebootTest.java
@@ -5,7 +5,8 @@ import com.yahoo.vespa.hosted.dockerapi.DockerImage;
import com.yahoo.vespa.hosted.node.admin.ContainerNodeSpec;
import com.yahoo.vespa.hosted.node.admin.docker.DockerOperationsImpl;
import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdmin;
-import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdater;
+import com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater;
+import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdaterImpl;
import com.yahoo.vespa.hosted.provision.Node;
import org.junit.Ignore;
import org.junit.Test;
@@ -41,7 +42,7 @@ public class RebootTest {
"createContainerCommand with DockerImage { imageId=dockerImage }, HostName: host1.test.yahoo.com, ContainerName { name=host1 }",
"updateNodeAttributes with HostName: host1.test.yahoo.com, NodeAttributes{restartGeneration=1, rebootGeneration=null, dockerImage=dockerImage, vespaVersion='null'}");
- NodeAdminStateUpdater updater = dockerTester.nodeAdminStateUpdater;
+ NodeAdminStateUpdaterImpl updater = dockerTester.nodeAdminStateUpdater;
assertThat(updater.setResumeStateAndCheckIfResumed(NodeAdminStateUpdater.State.SUSPENDED),
is(Optional.of("Not all node agents are frozen.")));
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RunInContainerTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RunInContainerTest.java
index 23d55bd947c..a0e122d99fc 100644
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RunInContainerTest.java
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/RunInContainerTest.java
@@ -15,7 +15,8 @@ import com.yahoo.vespa.hosted.node.admin.maintenance.StorageMaintainer;
import com.yahoo.vespa.hosted.node.admin.maintenance.acl.AclMaintainer;
import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdmin;
import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminImpl;
-import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdater;
+import com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater;
+import com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminStateUpdaterImpl;
import com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgent;
import com.yahoo.vespa.hosted.node.admin.nodeagent.NodeAgentImpl;
import com.yahoo.vespa.hosted.node.admin.noderepository.NodeRepository;
@@ -77,7 +78,7 @@ public class RunInContainerTest {
@Before
public void startContainer() throws Exception {
- // To test the initial NodeAdminStateUpdater convergence towards RESUME, orchestrator should
+ // To test the initial NodeAdminStateUpdaterImpl convergence towards RESUME, orchestrator should
// deny permission to resume for parent host, otherwise it'll converge to RESUME before REST
// handler comes up
doThrow(new RuntimeException()).when(orchestratorMock).resume(parentHostname);
@@ -241,7 +242,7 @@ public class RunInContainerTest {
(hostName) -> new NodeAgentImpl(hostName, nodeRepositoryMock, orchestratorMock, dockerOperationsMock,
storageMaintainer, aclMaintainer, environment, Clock.systemUTC(), NODE_AGENT_SCAN_INTERVAL);
private final NodeAdmin nodeAdmin = new NodeAdminImpl(dockerOperationsMock, nodeAgentFactory, storageMaintainer, aclMaintainer, mr, Clock.systemUTC());
- private final NodeAdminStateUpdater nodeAdminStateUpdater = new NodeAdminStateUpdater(nodeRepositoryMock,
+ private final NodeAdminStateUpdaterImpl nodeAdminStateUpdater = new NodeAdminStateUpdaterImpl(nodeRepositoryMock,
orchestratorMock, storageMaintainer, nodeAdmin, "localhost.test.yahoo.com", Clock.systemUTC(), NODE_ADMIN_CONVERGE_STATE_INTERVAL, new ClassLocking());
public NodeAdminProviderWithMocks() {
@@ -249,7 +250,7 @@ public class RunInContainerTest {
}
@Override
- public NodeAdminStateUpdater get() {
+ public NodeAdminStateUpdaterImpl get() {
return nodeAdminStateUpdater;
}
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/io/FileSystemTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/io/FileSystemTest.java
deleted file mode 100644
index 6961efc159c..00000000000
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/io/FileSystemTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.io;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-
-import java.nio.file.Path;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-public class FileSystemTest {
- @Rule
- public final TemporaryFolder folder = new TemporaryFolder();
-
- private Path root;
- private Path path;
-
- private final FileSystem fileSystem = new FileSystem();
-
- @Before
- public void setUp() throws Exception {
- root = folder.getRoot().toPath();
- path = folder.newFile().toPath();
- }
-
- @Test
- public void isDirectory() throws Exception {
- assertTrue(fileSystem.isDirectory(root));
- assertFalse(fileSystem.isDirectory(path));
- }
-
- @Test
- public void isRegularFile() throws Exception {
- assertTrue(fileSystem.isRegularFile(path));
- assertFalse(fileSystem.isRegularFile(root));
- }
-
- @Test
- public void createDirectory() throws Exception {
- Path dir = root.resolve("subdir");
- fileSystem.createDirectory(dir);
- assertTrue(fileSystem.isDirectory(dir));
- }
-
- @Test
- public void utf8FileIO() throws Exception {
- String original = "foo\nbar\n";
- Path path = root.resolve("example.txt");
- fileSystem.writeUtf8File(path, original);
- String fromFile = fileSystem.readUtf8File(path);
- assertEquals(original, fromFile);
- }
-
- @Test
- public void permissions() throws Exception {
- String expectedPermissions = "rwxr-x---";
- fileSystem.setPermissions(path, expectedPermissions);
- assertEquals(expectedPermissions, fileSystem.getPermissions(path));
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void badPermissionsString() {
- fileSystem.setPermissions(path, "abcdefghi");
- }
-
- @Test
- public void owner() throws Exception {
- String owner = fileSystem.getOwner(path);
- fileSystem.setOwner(path, owner);
- }
-
- @Test
- public void group() throws Exception {
- String group = fileSystem.getGroup(path);
- fileSystem.setGroup(path, group);
- }
-} \ No newline at end of file
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdaterTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdaterImplTest.java
index 1058278a02c..7920d0cad29 100644
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdaterTest.java
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdminStateUpdaterImplTest.java
@@ -7,6 +7,7 @@ import com.yahoo.vespa.hosted.node.admin.maintenance.StorageMaintainer;
import com.yahoo.vespa.hosted.node.admin.noderepository.NodeRepository;
import com.yahoo.vespa.hosted.node.admin.orchestrator.Orchestrator;
import com.yahoo.vespa.hosted.node.admin.orchestrator.OrchestratorException;
+import com.yahoo.vespa.hosted.node.admin.provider.NodeAdminStateUpdater;
import com.yahoo.vespa.hosted.provision.Node;
import org.junit.Test;
@@ -32,11 +33,11 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
/**
- * Basic test of NodeAdminStateUpdater
+ * Basic test of NodeAdminStateUpdaterImpl
*
* @author freva
*/
-public class NodeAdminStateUpdaterTest {
+public class NodeAdminStateUpdaterImplTest {
private final NodeRepository nodeRepository = mock(NodeRepository.class);
private final Orchestrator orchestrator = mock(Orchestrator.class);
private final StorageMaintainer storageMaintainer = mock(StorageMaintainer.class);
@@ -45,7 +46,7 @@ public class NodeAdminStateUpdaterTest {
private final ManualClock clock = new ManualClock();
private final Duration convergeStateInterval = Duration.ofSeconds(30);
- private final NodeAdminStateUpdater refresher = spy(new NodeAdminStateUpdater(
+ private final NodeAdminStateUpdaterImpl refresher = spy(new NodeAdminStateUpdaterImpl(
nodeRepository, orchestrator, storageMaintainer, nodeAdmin, parentHostname, clock, convergeStateInterval, null));
@@ -102,7 +103,7 @@ public class NodeAdminStateUpdaterTest {
// The second orchestration failure happens after the freeze convergence timeout,
// and so SHOULD call setFrozen(false)
when(nodeAdmin.setFrozen(eq(true))).thenReturn(true);
- when(nodeAdmin.subsystemFreezeDuration()).thenReturn(NodeAdminStateUpdater.FREEZE_CONVERGENCE_TIMEOUT.plusMinutes(1));
+ when(nodeAdmin.subsystemFreezeDuration()).thenReturn(NodeAdminStateUpdaterImpl.FREEZE_CONVERGENCE_TIMEOUT.plusMinutes(1));
doThrow(new RuntimeException("Cannot allow to suspend because some reason")).doNothing()
.when(orchestrator).suspend(eq(parentHostname));
tickAfter(35);
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/AddYumRepoTaskTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/AddYumRepoTaskTest.java
deleted file mode 100644
index 3e444f08508..00000000000
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/AddYumRepoTaskTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.task;
-
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class AddYumRepoTaskTest extends TaskTestBase {
- private Path expectedPath;
- private String expectedContent;
- private AddYumRepoTask task;
-
- public void setUp() {
- String repository = "repo-id";
- String name = "name";
- String baseUrl = "base-url";
- boolean enabled = true;
- expectedContent = "# This file was generated by node admin\n" +
- "# Do NOT modify this file by hand\n" +
- "\n" +
- "[repo-id]\n" +
- "name=name\n" +
- "baseurl=base-url\n" +
- "enabled=1\n" +
- "gpgcheck=0\n";
-
- task = new AddYumRepoTask(repository, name, baseUrl, enabled);
- expectedPath = Paths.get("/etc/yum.repos.d/" + repository + ".repo");
- }
-
- @Test
- public void alreadyExistsIsNoOp() {
- when(fileSystemMock.isRegularFile(expectedPath)).thenReturn(true);
- assertFalse(task.execute(contextMock));
- }
-
- @Test
- public void fileContent() {
- assertEquals(expectedContent, task.getRepoFileContent());
- }
-
- @Test
- public void createsFile() {
- when(fileSystemMock.isRegularFile(expectedPath)).thenReturn(false);
- when(contextMock.executeSubtask(any())).thenReturn(true);
- assertTrue(task.execute(contextMock));
-
- // Writing a file with the expected content
- ArgumentCaptor<WriteFileTask> writeFileTaskArgumentCaptor =
- ArgumentCaptor.forClass(WriteFileTask.class);
- verify(contextMock, times(1))
- .executeSubtask(writeFileTaskArgumentCaptor.capture());
- WriteFileTask writeFileTask = writeFileTaskArgumentCaptor.getValue();
- assertEquals(expectedPath, writeFileTask.getPath());
- assertEquals(expectedContent, writeFileTask.getContentProducer().call());
- assertEquals("rw-r--r--", writeFileTask.getPermissions().get());
- assertEquals("root", writeFileTask.getOwner().get());
- assertEquals("root", writeFileTask.getGroup().get());
- }
-} \ No newline at end of file
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/MakeDirectoryTaskTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/MakeDirectoryTaskTest.java
deleted file mode 100644
index cb4d8ab677c..00000000000
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/MakeDirectoryTaskTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.task;
-
-import com.yahoo.vespa.hosted.node.admin.io.FileSystem;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.InOrder;
-
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class MakeDirectoryTaskTest {
- private final FileSystem fileSystem = mock(FileSystem.class);
- private final Task.TaskContext context = mock(Task.TaskContext.class);
- private final Path root = Paths.get("/");
- private final Path fooDir = root.resolve("foo");
- private final Path barDir = fooDir.resolve("bar");
- private final MakeDirectoryTask task = new MakeDirectoryTask(barDir);
-
- @Before
- public void setUp() {
- when(context.getFileSystem()).thenReturn(fileSystem);
- }
-
- @Test
- public void directoryExists() {
- when(fileSystem.isDirectory(barDir)).thenReturn(true);
- assertFalse(task.execute(context));
- }
-
- @Test
- public void withParents() {
- when(fileSystem.isDirectory(barDir)).thenReturn(false);
- when(fileSystem.isDirectory(fooDir)).thenReturn(false);
- when(fileSystem.isDirectory(root)).thenReturn(true);
- assertTrue(task.withParents().execute(context));
-
- InOrder inOrder = inOrder(fileSystem);
- inOrder.verify(fileSystem).createDirectory(fooDir);
- inOrder.verify(fileSystem).createDirectory(barDir);
- inOrder.verifyNoMoreInteractions();
- }
-} \ No newline at end of file
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/TaskTestBase.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/TaskTestBase.java
deleted file mode 100644
index ac24ac6524e..00000000000
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/TaskTestBase.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.task;
-
-import com.yahoo.vespa.hosted.node.admin.io.FileSystem;
-import org.junit.Before;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-abstract class TaskTestBase {
- protected final FileSystem fileSystemMock = mock(FileSystem.class);
- protected final Task.TaskContext contextMock = mock(Task.TaskContext.class);
-
- @Before
- public void baseSetup() {
- when(contextMock.getFileSystem()).thenReturn(fileSystemMock);
- when(fileSystemMock.withPath(any())).thenCallRealMethod();
- setUp();
- }
-
- /**
- * Override this to set up before each test.
- */
- void setUp() {}
-}
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/WriteFileTaskTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/WriteFileTaskTest.java
deleted file mode 100644
index 9c998cc6fdb..00000000000
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/WriteFileTaskTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.node.admin.task;
-
-import org.glassfish.jersey.internal.util.Producer;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class WriteFileTaskTest extends TaskTestBase {
- private final String content = "line1\nline2\n";
-
- @Test
- public void testWrite() {
- Path parentDirectory = Paths.get("/foo");
- Path path = parentDirectory.resolve("bar");
-
- @SuppressWarnings("unchecked")
- Producer<String> contentProducer = (Producer<String>) mock(Producer.class);
- when(contentProducer.call()).thenReturn(content);
-
- final String permissions = "rwxr-x---";
- final String owner = "owner";
- final String group = "group";
-
- WriteFileTask task = new WriteFileTask(path, contentProducer)
- .withPermissions(permissions)
- .withOwner(owner)
- .withGroup(group);
-
- when(fileSystemMock.isRegularFile(path)).thenReturn(false);
- when(contextMock.executeSubtask(any(MakeDirectoryTask.class))).thenReturn(false);
-
- assertTrue(task.execute(contextMock));
-
- verify(contentProducer, times(1)).call();
- verify(fileSystemMock).writeUtf8File(path, content);
- verify(fileSystemMock).setPermissions(path, permissions);
- verify(fileSystemMock).setOwner(path, owner);
- verify(fileSystemMock).setGroup(path, group);
-
- // Writing a file with the expected content
- ArgumentCaptor<MakeDirectoryTask> makeDirectoryTaskCaptor =
- ArgumentCaptor.forClass(MakeDirectoryTask.class);
- verify(contextMock, times(1))
- .executeSubtask(makeDirectoryTaskCaptor.capture());
-
- MakeDirectoryTask makeDirectoryTask = makeDirectoryTaskCaptor.getValue();
- assertEquals(parentDirectory, makeDirectoryTask.getPath());
- assertTrue(makeDirectoryTask.getWithParents());
- }
-
- @Test
- public void fileAlreadyExists() {
- Path path = Paths.get("foo");
-
- final String permissions = "rwxr-x---";
- final String owner = "owner";
- final String group = "group";
-
- WriteFileTask task = new WriteFileTask(path, () -> content)
- .withPermissions(permissions)
- .withOwner(owner)
- .withGroup(group);
-
- when(fileSystemMock.isRegularFile(path)).thenReturn(true);
-
- assertFalse(task.execute(contextMock));
- }
-} \ No newline at end of file
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/FileWriterTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/FileWriterTest.java
new file mode 100644
index 00000000000..ca4eabf855b
--- /dev/null
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/FileWriterTest.java
@@ -0,0 +1,51 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+package com.yahoo.vespa.hosted.node.admin.task.util.file;
+
+import com.yahoo.vespa.hosted.node.admin.component.TaskContext;
+import org.junit.Test;
+
+import java.nio.file.FileSystem;
+import java.nio.file.Path;
+import java.time.Instant;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+public class FileWriterTest {
+ private final FileSystem fileSystem = TestFileSystem.create();
+
+ @Test
+ public void testWrite() {
+ final String content = "content";
+ final String permissions = "rwxr-xr-x";
+ final String owner = "owner";
+ final String group = "group";
+
+ Path path = fileSystem.getPath("/opt/vespa/tmp/file.txt");
+ FileWriter writer = new FileWriter(path, () -> content)
+ .withPermissions(permissions)
+ .withOwner(owner)
+ .withGroup(group);
+ TaskContext context = mock(TaskContext.class);
+ assertTrue(writer.converge(context));
+ verify(context, times(1)).logSystemModification(any(), eq("Writing file " + path));
+
+ UnixPath unixPath = new UnixPath(path);
+ assertEquals(content, unixPath.readUtf8File());
+ assertEquals(permissions, unixPath.getPermissions());
+ assertEquals(owner, unixPath.getOwner());
+ assertEquals(group, unixPath.getGroup());
+ Instant fileTime = unixPath.getLastModifiedTime();
+
+ // Second time is a no-op.
+ assertFalse(writer.converge(context));
+ assertEquals(fileTime, unixPath.getLastModifiedTime());
+ }
+}
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/TestFileSystem.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/TestFileSystem.java
new file mode 100644
index 00000000000..465cb671a97
--- /dev/null
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/TestFileSystem.java
@@ -0,0 +1,24 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+package com.yahoo.vespa.hosted.node.admin.task.util.file;
+
+import com.google.common.jimfs.Configuration;
+import com.google.common.jimfs.Feature;
+import com.google.common.jimfs.Jimfs;
+import com.google.common.jimfs.PathType;
+
+import java.nio.file.FileSystem;
+
+public class TestFileSystem {
+ public static FileSystem create() {
+ // This configuration is based on Configuration.unix(), except:
+ // - Use "posix" attribute view which is necessary for permissions, owner, and group.
+ Configuration configuration = Configuration.builder(PathType.unix())
+ .setRoots("/")
+ .setWorkingDirectory("/work")
+ .setAttributeViews("posix")
+ .setSupportedFeatures(Feature.LINKS, Feature.SYMBOLIC_LINKS, Feature.SECURE_DIRECTORY_STREAM, Feature.FILE_CHANNEL)
+ .build();
+ return Jimfs.newFileSystem(configuration);
+ }
+}
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPathTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPathTest.java
new file mode 100644
index 00000000000..821c6397ee7
--- /dev/null
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/UnixPathTest.java
@@ -0,0 +1,65 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+package com.yahoo.vespa.hosted.node.admin.task.util.file;
+
+import org.junit.Test;
+
+import java.nio.file.FileSystem;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class UnixPathTest {
+ final FileSystem fileSystem = TestFileSystem.create();
+
+ @Test
+ public void createParents() throws Exception {
+ Path parentDirectory = fileSystem.getPath("/a/b/c");
+ Path filePath = parentDirectory.resolve("bar");
+ UnixPath path = new UnixPath(filePath);
+
+ assertFalse(Files.exists(fileSystem.getPath("/a")));
+ path.createParents();
+ assertTrue(Files.exists(parentDirectory));
+ }
+
+ @Test
+ public void utf8File() throws Exception {
+ String original = "foo\nbar\n";
+ UnixPath path = new UnixPath(fileSystem.getPath("example.txt"));
+ path.writeUtf8File(original);
+ String fromFile = path.readUtf8File();
+ assertEquals(original, fromFile);
+ }
+
+ @Test
+ public void permissions() throws Exception {
+ String expectedPermissions = "rwxr-x---";
+ UnixPath path = new UnixPath(fileSystem.getPath("file.txt"));
+ path.writeUtf8File("foo");
+ path.setPermissions(expectedPermissions);
+ assertEquals(expectedPermissions, path.getPermissions());
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void badPermissionsString() {
+ new UnixPath(fileSystem.getPath("file.txt")).setPermissions("abcdefghi");
+ }
+
+ @Test
+ public void owner() throws Exception {
+ FileSystem fs = TestFileSystem.create();
+ Path path = fs.getPath("file.txt");
+ UnixPath unixPath = new UnixPath(path);
+ unixPath.writeUtf8File("foo");
+
+ unixPath.setOwner("owner");
+ assertEquals("owner", unixPath.getOwner());
+
+ unixPath.setGroup("group");
+ assertEquals("group", unixPath.getGroup());
+ }
+}
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/AddYumRepoTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/AddYumRepoTest.java
new file mode 100644
index 00000000000..7b6ab91345b
--- /dev/null
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/yum/AddYumRepoTest.java
@@ -0,0 +1,57 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+package com.yahoo.vespa.hosted.node.admin.task.util.yum;
+
+import com.yahoo.vespa.hosted.node.admin.component.TaskContext;
+import com.yahoo.vespa.hosted.node.admin.task.util.file.TestFileSystem;
+import com.yahoo.vespa.hosted.node.admin.task.util.file.UnixPath;
+import org.junit.Test;
+
+import java.nio.file.FileSystem;
+import java.time.Instant;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public class AddYumRepoTest {
+ @Test
+ public void converge() throws Exception {
+ String repositoryId = "repoid";
+ String name = "name";
+ String baseurl = "http://foo.com/bar";
+ boolean enabled = true;
+
+ AddYumRepo addYumRepo = new AddYumRepo(
+ repositoryId,
+ name,
+ baseurl,
+ enabled);
+
+ TaskContext context = mock(TaskContext.class);
+
+ FileSystem fileSystem = TestFileSystem.create();
+ when(context.fileSystem()).thenReturn(fileSystem);
+
+ assertTrue(addYumRepo.converge(context));
+
+ UnixPath unixPath = new UnixPath(fileSystem.getPath("/etc/yum.repos.d/" + repositoryId + ".repo"));
+ String content = unixPath.readUtf8File();
+ assertEquals("# This file was generated by node admin\n" +
+ "# Do NOT modify this file by hand\n" +
+ "\n" +
+ "[repoid]\n" +
+ "name=name\n" +
+ "baseurl=http://foo.com/bar\n" +
+ "enabled=1\n" +
+ "gpgcheck=0\n", content);
+ Instant lastModifiedTime = unixPath.getLastModifiedTime();
+
+ // Second time is a no-op
+ assertFalse(addYumRepo.converge(context));
+ assertEquals(lastModifiedTime, unixPath.getLastModifiedTime());
+ }
+
+} \ No newline at end of file
diff --git a/parent/pom.xml b/parent/pom.xml
index de02f5085ea..46b8c90baef 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -607,6 +607,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.google.jimfs</groupId>
+ <artifactId>jimfs</artifactId>
+ <version>1.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>4.3.0</version>
diff --git a/searchcommon/src/vespa/searchcommon/common/growstrategy.h b/searchcommon/src/vespa/searchcommon/common/growstrategy.h
index 920e07e99f1..a0431b16d51 100644
--- a/searchcommon/src/vespa/searchcommon/common/growstrategy.h
+++ b/searchcommon/src/vespa/searchcommon/common/growstrategy.h
@@ -12,27 +12,40 @@ private:
uint32_t _docsInitialCapacity;
uint32_t _docsGrowPercent;
uint32_t _docsGrowDelta;
+ float _multiValueAllocGrowFactor;
public:
- GrowStrategy(uint32_t docsInitialCapacity = 1024,
- uint32_t docsGrowPercent = 50,
- uint32_t docsGrowDelta = 0)
+ GrowStrategy()
+ : GrowStrategy(1024, 50, 0, 0.2)
+ {}
+ GrowStrategy(uint32_t docsInitialCapacity,
+ uint32_t docsGrowPercent,
+ uint32_t docsGrowDelta,
+ float multiValueAllocGrowFactor)
: _docsInitialCapacity(docsInitialCapacity),
_docsGrowPercent(docsGrowPercent),
- _docsGrowDelta(docsGrowDelta)
+ _docsGrowDelta(docsGrowDelta),
+ _multiValueAllocGrowFactor(multiValueAllocGrowFactor)
{
}
- uint32_t getDocsInitialCapacity() const { return _docsInitialCapacity; }
- uint32_t getDocsGrowPercent() const { return _docsGrowPercent; }
- uint32_t getDocsGrowDelta() const { return _docsGrowDelta; }
- void setDocsInitialCapacity(uint32_t v) { _docsInitialCapacity = v; }
- void setDocsGrowPercent(uint32_t v) { _docsGrowPercent = v; }
- void setDocsGrowDelta(uint32_t v) { _docsGrowDelta = v; }
+ static GrowStrategy make(uint32_t docsInitialCapacity,
+ uint32_t docsGrowPercent,
+ uint32_t docsGrowDelta) {
+ return GrowStrategy(docsInitialCapacity, docsGrowPercent, docsGrowDelta, 0.2);
+ }
+
+ uint32_t getDocsInitialCapacity() const { return _docsInitialCapacity; }
+ uint32_t getDocsGrowPercent() const { return _docsGrowPercent; }
+ uint32_t getDocsGrowDelta() const { return _docsGrowDelta; }
+ float getMultiValueAllocGrowFactor() const { return _multiValueAllocGrowFactor; }
+ void setDocsInitialCapacity(uint32_t v) { _docsInitialCapacity = v; }
+ void setDocsGrowDelta(uint32_t v) { _docsGrowDelta = v; }
bool operator==(const GrowStrategy & rhs) const {
return _docsInitialCapacity == rhs._docsInitialCapacity &&
_docsGrowPercent == rhs._docsGrowPercent &&
- _docsGrowDelta == rhs._docsGrowDelta;
+ _docsGrowDelta == rhs._docsGrowDelta &&
+ _multiValueAllocGrowFactor == rhs._multiValueAllocGrowFactor;
}
bool operator!=(const GrowStrategy & rhs) const {
return !(operator==(rhs));
diff --git a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
index 899dc146c8e..6da1ff890c9 100644
--- a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
@@ -24,6 +24,7 @@ LOG_SETUP("attribute_manager_test");
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/predicate_attribute.h>
#include <vespa/searchlib/attribute/reference_attribute.h>
@@ -58,6 +59,7 @@ using search::attribute::BasicType;
using search::attribute::IAttributeContext;
using search::attribute::IAttributeVector;
using search::attribute::ImportedAttributeVector;
+using search::attribute::ImportedAttributeVectorFactory;
using search::attribute::ReferenceAttribute;
using search::attribute::test::MockGidToLidMapperFactory;
using search::index::DummyFileHeaderContext;
@@ -137,7 +139,7 @@ struct ImportedAttributesRepoBuilder {
refAttr->setGidToLidMapperFactory(std::make_shared<MockGidToLidMapperFactory>());
auto targetAttr = search::AttributeFactory::createAttribute(name + "_target", INT32_SINGLE);
auto documentMetaStore = std::shared_ptr<search::IDocumentMetaStoreContext>();
- auto importedAttr = std::make_shared<ImportedAttributeVector>(name, refAttr, targetAttr, documentMetaStore, false);
+ auto importedAttr = ImportedAttributeVectorFactory::create(name, refAttr, targetAttr, documentMetaStore, false);
_repo->add(name, importedAttr);
}
ImportedAttributesRepo::UP build() {
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp
index cb1df2df0c5..6e8191e7d40 100644
--- a/searchcore/src/tests/proton/attribute/attribute_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp
@@ -25,6 +25,7 @@ LOG_SETUP("attribute_test");
#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/bitvector_search_cache.h>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/predicate_attribute.h>
#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
@@ -58,6 +59,7 @@ using search::TuneFileAttributes;
using search::attribute::BitVectorSearchCache;
using search::attribute::IAttributeVector;
using search::attribute::ImportedAttributeVector;
+using search::attribute::ImportedAttributeVectorFactory;
using search::attribute::ReferenceAttribute;
using search::index::DummyFileHeaderContext;
using search::index::schema::CollectionType;
@@ -744,11 +746,11 @@ TEST_F("require that attribute writer spreads write over 3 write contexts", Fixt
ImportedAttributeVector::SP
createImportedAttribute(const vespalib::string &name)
{
- auto result = std::make_shared<ImportedAttributeVector>(name,
- ReferenceAttribute::SP(),
- AttributeVector::SP(),
- std::shared_ptr<search::IDocumentMetaStoreContext>(),
- true);
+ auto result = ImportedAttributeVectorFactory::create(name,
+ ReferenceAttribute::SP(),
+ AttributeVector::SP(),
+ std::shared_ptr<search::IDocumentMetaStoreContext>(),
+ true);
result->getSearchCache()->insert("foo", BitVectorSearchCache::Entry::SP());
return result;
}
diff --git a/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp b/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
index aac74e1583d..1bee7a79192 100644
--- a/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
+++ b/searchcore/src/tests/proton/attribute/imported_attributes_context/imported_attributes_context_test.cpp
@@ -8,6 +8,7 @@ LOG_SETUP("imported_attributes_context_test");
#include <vespa/searchlib/attribute/attribute.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h>
#include <vespa/searchlib/test/mock_gid_to_lid_mapping.h>
#include <future>
@@ -17,6 +18,7 @@ using search::attribute::BasicType;
using search::attribute::Config;
using search::attribute::IAttributeVector;
using search::attribute::ImportedAttributeVector;
+using search::attribute::ImportedAttributeVectorFactory;
using search::attribute::ReferenceAttribute;
using search::attribute::test::MockGidToLidMapperFactory;
using generation_t = AttributeVector::generation_t;
@@ -72,11 +74,11 @@ struct Fixture {
{
}
Fixture &addAttribute(const vespalib::string &name) {
- auto attr = std::make_shared<ImportedAttributeVector>(name,
- createReferenceAttribute(name + "_ref"),
- createTargetAttribute(name + "_target"),
- std::shared_ptr<search::IDocumentMetaStoreContext>(),
- false);
+ auto attr = ImportedAttributeVectorFactory::create(name,
+ createReferenceAttribute(name + "_ref"),
+ createTargetAttribute(name + "_target"),
+ std::shared_ptr<search::IDocumentMetaStoreContext>(),
+ false);
repo.add(name, attr);
return *this;
}
diff --git a/searchcore/src/tests/proton/attribute/imported_attributes_repo/imported_attributes_repo_test.cpp b/searchcore/src/tests/proton/attribute/imported_attributes_repo/imported_attributes_repo_test.cpp
index e23c308050b..ddabed210d8 100644
--- a/searchcore/src/tests/proton/attribute/imported_attributes_repo/imported_attributes_repo_test.cpp
+++ b/searchcore/src/tests/proton/attribute/imported_attributes_repo/imported_attributes_repo_test.cpp
@@ -7,6 +7,7 @@ LOG_SETUP("imported_attributes_repo_test");
#include <vespa/searchcommon/attribute/iattributevector.h>
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h>
#include <vespa/searchlib/attribute/reference_attribute.h>
using proton::ImportedAttributesRepo;
@@ -14,16 +15,17 @@ using search::AttributeVector;
using search::attribute::BasicType;
using search::attribute::Config;
using search::attribute::ImportedAttributeVector;
+using search::attribute::ImportedAttributeVectorFactory;
using search::attribute::ReferenceAttribute;
ImportedAttributeVector::SP
createAttr(const vespalib::string &name)
{
- return std::make_shared<ImportedAttributeVector>(name,
- ReferenceAttribute::SP(),
- AttributeVector::SP(),
- std::shared_ptr<search::IDocumentMetaStoreContext>(),
- false);
+ return ImportedAttributeVectorFactory::create(name,
+ ReferenceAttribute::SP(),
+ AttributeVector::SP(),
+ std::shared_ptr<search::IDocumentMetaStoreContext>(),
+ false);
}
struct Fixture {
diff --git a/searchcore/src/vespa/searchcore/config/proton.def b/searchcore/src/vespa/searchcore/config/proton.def
index f46f6c67fd4..d7b1cbfa45f 100644
--- a/searchcore/src/vespa/searchcore/config/proton.def
+++ b/searchcore/src/vespa/searchcore/config/proton.def
@@ -205,6 +205,10 @@ grow.add int default=1 restart
## The number of documents to amortize memory spike cost over
grow.numdocs int default=10000 restart
+## The grow factor used when allocating buffers in the array store
+## used in multi-value attribute vectors to store underlying values.
+grow.multivalueallocfactor double default=0.2 restart
+
## Control cache size in bytes.
summary.cache.maxbytes long default=0
diff --git a/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp b/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp
index 9abe8181282..9be0eb2c728 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp
+++ b/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp
@@ -9,6 +9,7 @@
#include <vespa/searchcommon/attribute/iattributevector.h>
#include <vespa/searchlib/attribute/iattributemanager.h>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h>
#include <vespa/searchlib/attribute/reference_attribute.h>
#include <vespa/config-imported-fields.h>
#include <vespa/document/datatype/documenttype.h>
@@ -22,7 +23,7 @@ using document::ReferenceDataType;
using search::attribute::BasicType;
using search::attribute::Config;
using search::attribute::IAttributeVector;
-using search::attribute::ImportedAttributeVector;
+using search::attribute::ImportedAttributeVectorFactory;
using search::attribute::ReferenceAttribute;
using search::AttributeGuard;
using search::AttributeVector;
@@ -144,8 +145,7 @@ DocumentDBReferenceResolver::createImportedAttributesRepo(const IAttributeManage
for (const auto &attr : _importedFieldsCfg.attribute) {
ReferenceAttribute::SP refAttr = getReferenceAttribute(attr.referencefield, attrMgr);
AttributeVector::SP targetAttr = getTargetDocumentDB(refAttr->getName())->getAttribute(attr.targetfield);
- ImportedAttributeVector::SP importedAttr =
- std::make_shared<ImportedAttributeVector>(attr.name, refAttr, targetAttr, documentMetaStore, useSearchCache);
+ auto importedAttr = ImportedAttributeVectorFactory::create(attr.name, refAttr, targetAttr, documentMetaStore, useSearchCache);
result->add(importedAttr->getName(), importedAttr);
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
index 4c1dd47569b..46233af1a45 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
@@ -11,12 +11,25 @@
#include <vespa/searchcore/proton/metrics/documentdb_metrics_collection.h>
using proton::matching::SessionManager;
-using search::index::Schema;
+using search::GrowStrategy;
using search::SerialNum;
+using search::index::Schema;
using searchcorespi::IFlushTarget;
namespace proton {
+namespace {
+
+GrowStrategy
+makeGrowStrategy(uint32_t docsInitialCapacity,
+ const DocumentSubDBCollection::ProtonConfig::Grow &growCfg)
+{
+ return GrowStrategy(docsInitialCapacity, growCfg.factor,
+ growCfg.add, growCfg.multivalueallocfactor);
+}
+
+}
+
DocumentSubDBCollection::DocumentSubDBCollection(
IDocumentSubDBOwner &owner,
search::transactionlog::SyncProxy &tlSyncer,
@@ -49,9 +62,9 @@ DocumentSubDBCollection::DocumentSubDBCollection(
const ProtonConfig::Distribution & distCfg = protonCfg.distribution;
_bucketDB = std::make_shared<BucketDBOwner>();
_bucketDBHandler.reset(new bucketdb::BucketDBHandler(*_bucketDB));
- search::GrowStrategy searchableGrowth(growCfg.initial * distCfg.searchablecopies, growCfg.factor, growCfg.add);
- search::GrowStrategy removedGrowth(std::max(1024l, growCfg.initial/100), growCfg.factor, growCfg.add);
- search::GrowStrategy notReadyGrowth(growCfg.initial * (distCfg.redundancy - distCfg.searchablecopies), growCfg.factor, growCfg.add);
+ GrowStrategy searchableGrowth = makeGrowStrategy(growCfg.initial * distCfg.searchablecopies, growCfg);
+ GrowStrategy removedGrowth = makeGrowStrategy(std::max(1024l, growCfg.initial/100), growCfg);
+ GrowStrategy notReadyGrowth = makeGrowStrategy(growCfg.initial * (distCfg.redundancy - distCfg.searchablecopies), growCfg);
size_t attributeGrowNumDocs(growCfg.numdocs);
size_t numSearcherThreads = protonCfg.numsearcherthreads;
diff --git a/searchlib/CMakeLists.txt b/searchlib/CMakeLists.txt
index d77ec346cef..3b321f4a12f 100644
--- a/searchlib/CMakeLists.txt
+++ b/searchlib/CMakeLists.txt
@@ -108,6 +108,7 @@ vespa_define_module(
src/tests/common/summaryfeatures
src/tests/datastore/array_store
src/tests/datastore/array_store_config
+ src/tests/datastore/buffer_type
src/tests/datastore/datastore
src/tests/datastore/unique_store
src/tests/diskindex/bitvector
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/RankingExpression.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/RankingExpression.java
index 6e79877a657..1ec6ea4693b 100755
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/RankingExpression.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/RankingExpression.java
@@ -2,18 +2,24 @@
package com.yahoo.searchlib.rankingexpression;
import com.yahoo.searchlib.rankingexpression.evaluation.Context;
-import com.yahoo.searchlib.rankingexpression.evaluation.DoubleValue;
import com.yahoo.searchlib.rankingexpression.evaluation.Value;
import com.yahoo.searchlib.rankingexpression.parser.ParseException;
import com.yahoo.searchlib.rankingexpression.parser.RankingExpressionParser;
import com.yahoo.searchlib.rankingexpression.parser.TokenMgrError;
-import com.yahoo.searchlib.rankingexpression.rule.ConstantNode;
import com.yahoo.searchlib.rankingexpression.rule.ExpressionNode;
import com.yahoo.searchlib.rankingexpression.rule.SerializationContext;
-import com.yahoo.searchlib.rankingexpression.rule.SetMembershipNode;
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.Reader;
+import java.io.Serializable;
+import java.io.StringReader;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
/**
* <p>A ranking expression. Ranking expressions are used to calculate a rank score for a searched instance from a set of
@@ -92,13 +98,15 @@ public class RankingExpression implements Serializable {
}
/**
- * Creates a ranking expression from a string
+ * Creates a new ranking expression by consuming from the reader
*
- * @param expression The reader that contains the string to parse.
+ * @param name the name of the ranking expression
+ * @param expression the expression to parse.
* @throws ParseException if the string could not be parsed.
*/
- public RankingExpression(String expression) throws ParseException {
+ public RankingExpression(String name, String expression) throws ParseException {
try {
+ this.name = name;
if (expression == null || expression.length() == 0) {
throw new IllegalArgumentException("Empty ranking expressions are not allowed");
}
@@ -112,6 +120,16 @@ public class RankingExpression implements Serializable {
}
/**
+ * Creates a ranking expression from a string
+ *
+ * @param expression The reader that contains the string to parse.
+ * @throws ParseException if the string could not be parsed.
+ */
+ public RankingExpression(String expression) throws ParseException {
+ this("", expression);
+ }
+
+ /**
* Creates a ranking expression from a file. For convenience, the file.getName() up to any dot becomes the name of
* this expression.
*
@@ -259,7 +277,7 @@ public class RankingExpression implements Serializable {
/**
* Creates a ranking expression from a string
- *
+ *
* @throws IllegalArgumentException if the string is not a valid ranking expression
*/
public static RankingExpression from(String expression) {
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/OperationMapper.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/OperationMapper.java
index 8c1b4a4e5fe..85452d16a77 100644
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/OperationMapper.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/OperationMapper.java
@@ -2,14 +2,26 @@
package com.yahoo.searchlib.rankingexpression.integration.tensorflow;
import com.google.common.collect.ImmutableList;
+import com.yahoo.searchlib.rankingexpression.RankingExpression;
+import com.yahoo.searchlib.rankingexpression.evaluation.DoubleValue;
+import com.yahoo.searchlib.rankingexpression.rule.ArithmeticNode;
+import com.yahoo.searchlib.rankingexpression.rule.ArithmeticOperator;
+import com.yahoo.searchlib.rankingexpression.rule.ComparisonNode;
+import com.yahoo.searchlib.rankingexpression.rule.ConstantNode;
+import com.yahoo.searchlib.rankingexpression.rule.ExpressionNode;
+import com.yahoo.searchlib.rankingexpression.rule.GeneratorLambdaFunctionNode;
import com.yahoo.searchlib.rankingexpression.rule.ReferenceNode;
import com.yahoo.searchlib.rankingexpression.rule.TensorFunctionNode;
+import com.yahoo.searchlib.rankingexpression.rule.TruthOperator;
import com.yahoo.tensor.Tensor;
import com.yahoo.tensor.TensorType;
import com.yahoo.tensor.evaluation.VariableTensor;
+import com.yahoo.tensor.functions.Generate;
import com.yahoo.tensor.functions.Join;
import com.yahoo.tensor.functions.Matmul;
+import com.yahoo.tensor.functions.Reduce;
import com.yahoo.tensor.functions.Rename;
+import com.yahoo.tensor.functions.ScalarFunctions;
import com.yahoo.tensor.functions.Softmax;
import com.yahoo.tensor.functions.TensorFunction;
import org.tensorflow.SavedModelBundle;
@@ -18,9 +30,12 @@ import org.tensorflow.framework.AttrValue;
import org.tensorflow.framework.NodeDef;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import java.util.function.DoubleBinaryOperator;
import java.util.function.DoubleUnaryOperator;
+import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
/**
* Contains mappings of TensorFlow operations to the corresponding Vespa tensor functions.
@@ -50,32 +65,42 @@ class OperationMapper {
ensureArguments(2, arguments, "join");
TypedTensorFunction a = arguments.get(0);
TypedTensorFunction b = arguments.get(1);
- if (a.type().rank() < b.type().rank())
- throw new IllegalArgumentException("Attempt to join " + a.type() + " and " + b.type() + ", " +
- "but this is not supported when the second argument has a higher rank");
- TensorFunction bFunction = b.function();
+ if (a.type().rank() == 0 && b.type().rank() > 0) {
+ return new TypedTensorFunction(b.type(), new Join(a.function(), b.function(), doubleFunction));
+ }
+ if (b.type().rank() == 0 && a.type().rank() > 0) {
+ return new TypedTensorFunction(a.type(), new Join(a.function(), b.function(), doubleFunction));
+ }
+ if (a.type().rank() == b.type().rank()) {
+ return new TypedTensorFunction(a.type(), new Join(a.function(), b.function(), doubleFunction));
+ }
+
+ // Well now we have entered the wonderful world of "broadcasting"
+ // https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
+ // I'm not able to extract from that any unambiguous specification of which dimensions
+ // should be "stretched" when the tensor do not have the same number of dimensions.
+ // From trying this with TensorFlow it appears that the second tensor is matched to the
+ // "end" (highest numbered) dimensions of the first, but I'm not sure whether this is generally true.
+ // Anyway, we move the dimensions of b to the last dimensions of a (instead of by default, the first).
if (a.type().rank() > b.type().rank()) {
- // Well now we have entered the wonderful world of "broadcasting"
- // https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
- // I'm not able to extract from that any unambiguous specification of which dimensions
- // should be "stretched" when the tensor do not have the same number of dimensions.
- // From trying this with TensorFlow it appears that the second tensor is matched to the
- // "end" (highest numbered) dimensions of the first, but I'm not sure whether this is generally true.
- // Anyway, we move the dimensions of b to the last dimensions of a (instead of by default, the first).
- List<String> renameFrom = new ArrayList<>();
- List<String> renameTo = new ArrayList<>();
- int sizeDifference = a.type().rank() - b.type().rank();
- for (int i = 0; i < b.type().rank(); i++) {
- renameFrom.add(b.type().dimensions().get(i).name());
- renameTo.add("d" + (sizeDifference + i));
- }
- bFunction = new Rename(bFunction, renameFrom, renameTo);
+ TensorFunction renameFunction = renameForBroadcast(a, b);
+ return new TypedTensorFunction(a.type(), new Join(a.function(), renameFunction, doubleFunction));
}
+ TensorFunction renameFunction = renameForBroadcast(b, a);
+ return new TypedTensorFunction(b.type(), new Join(renameFunction, b.function(), doubleFunction));
+ }
- Join function = new Join(a.function(), bFunction, doubleFunction);
- return new TypedTensorFunction(a.type(), function); // output type is a type by TF definition and a.rank>=b.rank
+ private TensorFunction renameForBroadcast(TypedTensorFunction a, TypedTensorFunction b) {
+ List<String> renameFrom = new ArrayList<>();
+ List<String> renameTo = new ArrayList<>();
+ int sizeDifference = a.type().rank() - b.type().rank();
+ for (int i = 0; i < b.type().rank(); i++) {
+ renameFrom.add(b.type().dimensions().get(i).name());
+ renameTo.add("d" + (sizeDifference + i));
+ }
+ return new Rename(b.function(), renameFrom, renameTo);
}
TypedTensorFunction map(List<TypedTensorFunction> arguments, DoubleUnaryOperator doubleFunction) {
@@ -97,27 +122,53 @@ class OperationMapper {
return new TypedTensorFunction(type, new VariableTensor(name));
}
+ TypedTensorFunction placeholderWithDefault(NodeDef tfNode, SavedModelBundle model, TensorFlowModel result) {
+ String name = tfNode.getInput(0);
+ Tensor defaultValue = getConstantTensor(model, name);
+ result.constant(name, defaultValue);
+ result.macro(name, new RankingExpression(name, new ReferenceNode("constant(\"" + name + "\")")));
+ // The default value will be provided by the macro. Users can override macro to change value.
+ return new TypedTensorFunction(defaultValue.type(), new VariableTensor(name));
+ }
+
+ TypedTensorFunction constant(NodeDef tfNode, SavedModelBundle model, TensorFlowModel result) {
+ String name = tfNode.getName();
+ if (tfNode.getInputList().size() != 0) {
+ throw new IllegalArgumentException("A constant node must have zero inputs but '" + name + "' has " +
+ tfNode.getInputList().size());
+ }
+ return importConstantTensor(tfNode, model, result, name);
+ }
+
TypedTensorFunction identity(NodeDef tfNode, SavedModelBundle model, TensorFlowModel result) {
if ( ! tfNode.getName().endsWith("/read"))
throw new IllegalArgumentException("Encountered identity node " + tfNode.getName() + ", but identify " +
"nodes are only supported when reading variables");
if (tfNode.getInputList().size() != 1)
- throw new IllegalArgumentException("A Variable/read node must have one input but has " +
- tfNode.getInputList().size());
+ throw new IllegalArgumentException("A Variable/read node must have one input but '" +
+ tfNode.getName() + "' has " + tfNode.getInputList().size());
String name = tfNode.getInput(0);
+ return importConstantTensor(tfNode, model, result, name);
+ }
+
+ private TypedTensorFunction importConstantTensor(NodeDef tfNode, SavedModelBundle model, TensorFlowModel result, String name) {
AttrValue shapes = tfNode.getAttrMap().get("_output_shapes");
if (shapes == null)
- throw new IllegalArgumentException("Referenced variable '" + name + "' is missing a tensor output shape");
- Session.Runner fetched = model.session().runner().fetch(name);
- List<org.tensorflow.Tensor<?>> importedTensors = fetched.run();
- if ( importedTensors.size() != 1)
- throw new IllegalStateException("Expected 1 tensor from reading Variable " + name + ", but got " +
- importedTensors.size());
- Tensor constant = tensorConverter.toVespaTensor(importedTensors.get(0));
+ throw new IllegalArgumentException("'" + name + "' is missing a tensor shape");
+ Tensor constant = getConstantTensor(model, name);
result.constant(name, constant);
return new TypedTensorFunction(constant.type(),
- new TensorFunctionNode.TensorFunctionExpressionNode(new ReferenceNode("constant(" + name + ")")));
+ new TensorFunctionNode.TensorFunctionExpressionNode(new ReferenceNode("constant(\"" + name + "\")")));
+ }
+
+ private Tensor getConstantTensor(SavedModelBundle model, String name) {
+ Session.Runner fetched = model.session().runner().fetch(name);
+ List<org.tensorflow.Tensor<?>> importedTensors = fetched.run();
+ if (importedTensors.size() != 1)
+ throw new IllegalStateException("Expected 1 tensor from fetching " + name + ", but got " +
+ importedTensors.size());
+ return tensorConverter.toVespaTensor(importedTensors.get(0));
}
TypedTensorFunction matmul(List<TypedTensorFunction> arguments) {
@@ -143,6 +194,222 @@ class OperationMapper {
new Rename(matmul, afterLastDim, "d1"));
}
+ TypedTensorFunction mean(NodeDef tfNode, SavedModelBundle model, List<TypedTensorFunction> arguments) {
+ ensureArguments(2, arguments, "mean");
+ Tensor reductionIndices = getConstantTensor(model, tfNode.getInput(1));
+
+ TensorFunction inputFunction = arguments.get(0).function();
+ TensorType inputType = arguments.get(0).type();
+
+ List<String> reduceDimensions = new ArrayList<>();
+ for (Iterator<Tensor.Cell> cellIterator = reductionIndices.cellIterator(); cellIterator.hasNext();) {
+ Tensor.Cell cell = cellIterator.next();
+ int dimensionIndex = cell.getValue().intValue();
+ if (dimensionIndex < 0) {
+ dimensionIndex = inputType.dimensions().size() - dimensionIndex;
+ }
+ reduceDimensions.add(inputType.dimensions().get(dimensionIndex).name());
+ }
+
+ TensorType outputType = Reduce.outputType(inputType, reduceDimensions);
+ TensorFunction outputFunction = new Reduce(inputFunction, Reduce.Aggregator.avg, reduceDimensions);
+
+ if (shouldKeepDimensions(tfNode)) {
+ return reshape(outputFunction, outputType, keepDimensionType(inputType, reduceDimensions));
+ }
+
+ TypedTensorFunction output = checkNamingConvention(outputType, outputFunction);
+ return output;
+ }
+
+ private boolean shouldKeepDimensions(NodeDef tfNode) {
+ AttrValue keepDimsAttr = tfNode.getAttrMap().get("keep_dims");
+ return keepDimsAttr != null && keepDimsAttr.getB();
+ }
+
+ private TensorType keepDimensionType(TensorType inputType, List<String> reduceDimensions) {
+ TensorType.Builder builder = new TensorType.Builder();
+ for (TensorType.Dimension dimension: inputType.dimensions()) {
+ String name = dimension.name();
+ Long size = dimensionSize(dimension);
+ if (reduceDimensions.contains(name)) {
+ size = 1L;
+ }
+ builder.indexed(name, size);
+ }
+ return builder.build();
+ }
+
+ private TypedTensorFunction checkNamingConvention(TensorType type, TensorFunction function) {
+ for (int i = 0; i < type.dimensions().size(); ++i) {
+ String correct = String.format("d%d", i);
+ String current = type.dimensions().get(i).name();
+ if (!current.equals(correct)) {
+ return fixNamingConvention(type, function);
+ }
+ }
+ return new TypedTensorFunction(type, function);
+ }
+
+ private TypedTensorFunction fixNamingConvention(TensorType type, TensorFunction function) {
+ TensorType.Builder correctType = new TensorType.Builder();
+ List<String> from = new ArrayList<>();
+ List<String> to = new ArrayList<>();
+ for (int i = 0; i < type.dimensions().size(); ++i) {
+ String correct = String.format("d%d", i);
+ String current = type.dimensions().get(i).name();
+ if (!current.equals(correct)) {
+ from.add(current);
+ to.add(correct);
+ }
+ correctType.indexed(correct, dimensionSize(type.dimensions().get(i)));
+ }
+ if (from.size() > 0) {
+ function = new Rename(function, from, to);
+ type = correctType.build();
+ }
+ return new TypedTensorFunction(type, function);
+ }
+
+ TypedTensorFunction noOp(List<TypedTensorFunction> arguments) {
+ ensureArguments(1, arguments, "noOp");
+ return arguments.get(0);
+ }
+
+ TypedTensorFunction expandDims(NodeDef tfNode, SavedModelBundle model, List<TypedTensorFunction> arguments) {
+ ensureArguments(2, arguments, "expandDims");
+ Tensor axis = getConstantTensor(model, tfNode.getInput(1));
+ if (axis.type().rank() != 0) {
+ throw new IllegalArgumentException("Axis argument to ExpandDims must be a scalar");
+ }
+
+ TensorFunction inputFunction = arguments.get(0).function();
+ TensorType inputType = arguments.get(0).type();
+
+ int dimensionToInsert = (int)axis.asDouble();
+ if (dimensionToInsert < 0) {
+ dimensionToInsert = inputType.dimensions().size() - dimensionToInsert;
+ }
+
+ TensorType.Builder outputTypeBuilder = new TensorType.Builder();
+ int dimensionIndex = 0;
+ for (int i = 0; i < inputType.dimensions().size() + 1; ++i) {
+ String name = String.format("temp_%d", i);
+ Long size;
+ if (i == dimensionToInsert) {
+ size = 1L;
+ } else {
+ size = dimensionSize(inputType.dimensions().get(dimensionIndex));
+ dimensionIndex++;
+ }
+ outputTypeBuilder.indexed(name, size);
+ }
+
+ return reshape(inputFunction, inputType, outputTypeBuilder.build());
+ }
+
+ TypedTensorFunction reshape(NodeDef tfNode, SavedModelBundle model, List<TypedTensorFunction> arguments) {
+ ensureArguments(2, arguments, "reshape");
+ Tensor shape = getConstantTensor(model, tfNode.getInput(1));
+
+ TensorFunction inputFunction = arguments.get(0).function();
+ TensorType inputType = arguments.get(0).type();
+
+ TensorType.Builder outputTypeBuilder = new TensorType.Builder();
+ int dimensionIndex = 0;
+ for (Iterator<Tensor.Cell> cellIterator = shape.cellIterator(); cellIterator.hasNext();) {
+ Tensor.Cell cell = cellIterator.next();
+ int size = cell.getValue().intValue();
+ if (size < 0) {
+ size = -1 * (int)shape.reduce(Reduce.Aggregator.prod).asDouble() / tensorSize(inputType).intValue();
+ }
+ outputTypeBuilder.indexed(String.format("temp_%d", dimensionIndex), size);
+ dimensionIndex++;
+ }
+ return reshape(inputFunction, inputType, outputTypeBuilder.build());
+ }
+
+ private TypedTensorFunction reshape(TensorFunction inputFunction, TensorType inputType, TensorType outputType) {
+ if (!tensorSize(inputType).equals(tensorSize(outputType))) {
+ throw new IllegalArgumentException("New and old shape of tensor must have the same size when reshaping");
+ }
+
+ // Conceptually, reshaping consists on unrolling a tensor to an array using the dimension order,
+ // then use the dimension order of the new shape to roll back into a tensor.
+ // Here we create a transformation tensor that is multiplied with the from tensor to map into
+ // the new shape. We have to introduce temporary dimension names and rename back if dimension names
+ // in the new and old tensor type overlap.
+
+ ExpressionNode unrollFrom = unrollTensorExpression(inputType);
+ ExpressionNode unrollTo = unrollTensorExpression(outputType);
+ ExpressionNode transformExpression = new ComparisonNode(unrollFrom, TruthOperator.EQUAL, unrollTo);
+
+ TensorType transformationType = new TensorType.Builder(inputType, outputType).build();
+ Generate transformTensor = new Generate(transformationType,
+ new GeneratorLambdaFunctionNode(transformationType, transformExpression).asLongListToDoubleOperator());
+
+ TensorFunction outputFunction = new Reduce(
+ new Join(inputFunction, transformTensor, ScalarFunctions.multiply()),
+ Reduce.Aggregator.sum,
+ inputType.dimensions().stream().map(TensorType.Dimension::name).collect(Collectors.toList()));
+ TypedTensorFunction output = checkNamingConvention(outputType, outputFunction);
+ return output;
+ }
+
+ private ExpressionNode unrollTensorExpression(TensorType type) {
+ if (type.rank() == 0) {
+ return new ConstantNode(DoubleValue.zero);
+ }
+ List<ExpressionNode> children = new ArrayList<>();
+ List<ArithmeticOperator> operators = new ArrayList<>();
+ int size = 1;
+ for (int i = type.dimensions().size() - 1; i >= 0; --i) {
+ TensorType.Dimension dimension = type.dimensions().get(i);
+ children.add(0, new ReferenceNode(dimension.name()));
+ if (size > 1) {
+ operators.add(0, ArithmeticOperator.MULTIPLY);
+ children.add(0, new ConstantNode(new DoubleValue(size)));
+ }
+ size *= dimensionSize(dimension);
+ if (i > 0) {
+ operators.add(0, ArithmeticOperator.PLUS);
+ }
+ }
+ return new ArithmeticNode(children, operators);
+ }
+
+ TypedTensorFunction select(NodeDef tfNode, SavedModelBundle model, TensorFlowModel result, List<TypedTensorFunction> arguments) {
+ ensureArguments(3, arguments, "select");
+ Tensor condition = getConstantTensor(model, tfNode.getInput(0));
+
+ TypedTensorFunction x = arguments.get(1);
+ TypedTensorFunction y = arguments.get(2);
+ if ((x.type().rank() != y.type().rank()) || !(tensorSize(x.type()).equals(tensorSize(y.type())))) {
+ throw new IllegalArgumentException("'Select': input tensors must have the same shape");
+ }
+
+ if (condition.type().rank() == 0) {
+ return (int)condition.asDouble() == 0 ? y : x;
+ }
+ if (condition.type().rank() == 1 && dimensionSize(condition.type().dimensions().get(0)) == 1) {
+ return condition.cellIterator().next().getValue().intValue() == 0 ? y : x;
+ }
+
+ // The task is to select cells from 'x' or 'y' based on 'condition'.
+ // If 'condition' is 0 (false), select from 'y', if 1 (true) select
+ // from 'x'. We do this by individually joining 'x' and 'y' with
+ // 'condition', and then joining the resulting two tensors.
+
+ TypedTensorFunction conditionFunction = importConstantTensor(tfNode, model, result, tfNode.getInput(0));
+ TensorFunction xCond = new Join(x.function(), conditionFunction.function(), ScalarFunctions.multiply());
+ TensorFunction yCond = new Join(y.function(), conditionFunction.function(), new DoubleBinaryOperator() {
+ @Override public double applyAsDouble(double a, double b) { return a * (1.0 - b); }
+ @Override public String toString() { return "f(a,b)(a * (1-b))"; }
+ });
+ TensorFunction outputFunction = new Join(xCond, yCond, ScalarFunctions.add());
+ return new TypedTensorFunction(x.type(), outputFunction);
+ }
+
TypedTensorFunction softmax(List<TypedTensorFunction> arguments) {
ensureArguments(1, arguments, "softmax");
TypedTensorFunction a = arguments.get(0);
@@ -152,6 +419,50 @@ class OperationMapper {
return new TypedTensorFunction(Softmax.outputType(a.type(), dimension), softmax);
}
+ TypedTensorFunction squeeze(NodeDef tfNode, List<TypedTensorFunction> arguments) {
+ ensureArguments(1, arguments, "squeeze");
+
+ TensorFunction inputFunction = arguments.get(0).function();
+ TensorType inputType = arguments.get(0).type();
+ List<String> squeezeDimensions;
+
+ AttrValue squeezeDimsAttr = tfNode.getAttrMap().get("squeeze_dims");
+ if (squeezeDimsAttr == null) {
+ squeezeDimensions = inputType.dimensions().stream().
+ filter(dim -> dimensionSize(dim) == 1).
+ map(TensorType.Dimension::name).
+ collect(Collectors.toList());
+ } else {
+ squeezeDimensions = squeezeDimsAttr.getList().getIList().stream().
+ map(i -> i < 0 ? inputType.dimensions().size() - i : i).
+ map(i -> inputType.dimensions().get(i.intValue())).
+ filter(dim -> dimensionSize(dim) == 1).
+ map(TensorType.Dimension::name).
+ collect(Collectors.toList());
+ }
+
+ if (squeezeDimensions.isEmpty()) {
+ return arguments.get(0);
+ }
+
+ TensorFunction outputFunction = new Reduce(inputFunction, Reduce.Aggregator.sum, squeezeDimensions);
+ TensorType outputType = Reduce.outputType(inputType, squeezeDimensions);
+ TypedTensorFunction output = checkNamingConvention(outputType, outputFunction);
+ return output;
+ }
+
+ private Long tensorSize(TensorType type) {
+ Long size = 1L;
+ for (TensorType.Dimension dimension : type.dimensions()) {
+ size *= dimensionSize(dimension);
+ }
+ return size;
+ }
+
+ private Long dimensionSize(TensorType.Dimension dim) {
+ return dim.size().orElseThrow(() -> new IllegalArgumentException("Dimension has no size"));
+ }
+
private void ensureArguments(int count, List<TypedTensorFunction> arguments, String operationName) {
if ( arguments.size() != count)
throw new IllegalArgumentException("Expected " + count + " arguments to " + operationName +
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorConverter.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorConverter.java
index cabc1138b5b..ca880e6f310 100644
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorConverter.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorConverter.java
@@ -5,8 +5,12 @@ import com.yahoo.tensor.IndexedTensor;
import com.yahoo.tensor.Tensor;
import com.yahoo.tensor.TensorType;
+import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
import java.nio.FloatBuffer;
+import java.nio.IntBuffer;
+import java.nio.LongBuffer;
+
/**
* @author bratseth
@@ -36,7 +40,10 @@ public class TensorConverter {
switch (tfTensor.dataType()) {
case DOUBLE: return new DoubleValues(tfTensor);
case FLOAT: return new FloatValues(tfTensor);
- // TODO: The rest
+ case BOOL: return new BoolValues(tfTensor);
+ case UINT8: return new IntValues(tfTensor);
+ case INT32: return new IntValues(tfTensor);
+ case INT64: return new LongValues(tfTensor);
default:
throw new IllegalArgumentException("Cannot convert a tensor with elements of type " +
tfTensor.dataType() + " to a Vespa tensor");
@@ -92,4 +99,54 @@ public class TensorConverter {
}
+ private static class BoolValues extends Values {
+
+ private final ByteBuffer values;
+
+ BoolValues(org.tensorflow.Tensor<?> tfTensor) {
+ super(tfTensor.numElements());
+ values = ByteBuffer.allocate(tfTensor.numElements());
+ tfTensor.writeTo(values);
+ }
+
+ @Override
+ double get(int i) {
+ return values.get(i);
+ }
+
+ }
+
+ private static class IntValues extends Values {
+
+ private final IntBuffer values;
+
+ IntValues(org.tensorflow.Tensor<?> tfTensor) {
+ super(tfTensor.numElements());
+ values = IntBuffer.allocate(tfTensor.numElements());
+ tfTensor.writeTo(values);
+ }
+
+ @Override
+ double get(int i) {
+ return values.get(i);
+ }
+
+ }
+
+ private static class LongValues extends Values {
+
+ private final LongBuffer values;
+
+ LongValues(org.tensorflow.Tensor<?> tfTensor) {
+ super(tfTensor.numElements());
+ values = LongBuffer.allocate(tfTensor.numElements());
+ tfTensor.writeTo(values);
+ }
+
+ @Override
+ double get(int i) {
+ return values.get(i);
+ }
+
+ }
}
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowImporter.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowImporter.java
index 45f2b21343f..b9e244a3e08 100644
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowImporter.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowImporter.java
@@ -2,7 +2,7 @@
package com.yahoo.searchlib.rankingexpression.integration.tensorflow;
import com.yahoo.searchlib.rankingexpression.RankingExpression;
-import com.yahoo.searchlib.rankingexpression.rule.TensorFunctionNode;
+import com.yahoo.searchlib.rankingexpression.parser.ParseException;
import com.yahoo.tensor.TensorType;
import com.yahoo.tensor.functions.ScalarFunctions;
import com.yahoo.yolean.Exceptions;
@@ -105,26 +105,61 @@ public class TensorFlowImporter {
/** Recursively convert a graph of TensorFlow nodes into a Vespa tensor function expression tree */
private TypedTensorFunction importNode(NodeDef tfNode, GraphDef graph, SavedModelBundle model, TensorFlowModel result) {
TypedTensorFunction function = tensorFunctionOf(tfNode, graph, model, result);
- // We add all intermediate nodes imported as separate expressions. Only those referenced in a signature output
- // will be used
- result.expression(tfNode.getName(), new RankingExpression(tfNode.getName(), new TensorFunctionNode(function.function())));
- return function;
+ try {
+ // We add all intermediate nodes imported as separate expressions. Only those referenced in a signature output
+ // will be used. We parse the TensorFunction here to convert it to a RankingExpression tree
+ result.expression(tfNode.getName(), new RankingExpression(tfNode.getName(), function.function().toString()));
+ return function;
+ }
+ catch (ParseException e) {
+ throw new RuntimeException("Tensorflow function " + function.function() +
+ " cannot be parsed as a ranking expression", e);
+ }
}
+
+
private TypedTensorFunction tensorFunctionOf(NodeDef tfNode, GraphDef graph, SavedModelBundle model, TensorFlowModel result) {
// Import arguments lazily below, as some nodes have arguments unused arguments leading to unsupported ops
// TODO: Implement mapping of more functions from https://www.tensorflow.org/api_docs/python/
switch (tfNode.getOp().toLowerCase()) {
- case "add" : case "add_n" : return operationMapper.join(importArguments(tfNode, graph, model, result), ScalarFunctions.add());
- case "acos" : return operationMapper.map(importArguments(tfNode, graph, model, result), ScalarFunctions.acos());
- case "elu": return operationMapper.map(importArguments(tfNode, graph, model, result), ScalarFunctions.elu());
+ // array ops
+ case "const" : return operationMapper.constant(tfNode, model, result);
+ case "expanddims" : return operationMapper.expandDims(tfNode, model, importArguments(tfNode, graph, model, result));
case "identity" : return operationMapper.identity(tfNode, model, result);
case "placeholder" : return operationMapper.placeholder(tfNode, result);
- case "relu": return operationMapper.map(importArguments(tfNode, graph, model, result), ScalarFunctions.relu());
+ case "placeholderwithdefault" : return operationMapper.placeholderWithDefault(tfNode, model, result);
+ case "reshape" : return operationMapper.reshape(tfNode, model, importArguments(tfNode, graph, model, result));
+ case "squeeze" : return operationMapper.squeeze(tfNode, importArguments(tfNode, graph, model, result));
+
+ // math ops
+ case "add" : case "add_n" : return operationMapper.join(importArguments(tfNode, graph, model, result), ScalarFunctions.add());
+ case "acos" : return operationMapper.map(importArguments(tfNode, graph, model, result), ScalarFunctions.acos());
case "matmul" : return operationMapper.matmul(importArguments(tfNode, graph, model, result));
+ case "maximum" : return operationMapper.join(importArguments(tfNode, graph, model, result), ScalarFunctions.max());
+ case "mean" : case "reducemean": return operationMapper.mean(tfNode, model, importArguments(tfNode, graph, model, result));
+ case "multiply": case "mul" : return operationMapper.join(importArguments(tfNode, graph, model, result), ScalarFunctions.multiply());
+ case "rsqrt": return operationMapper.map(importArguments(tfNode, graph, model, result), ScalarFunctions.rsqrt());
+ case "where3": case "select" : return operationMapper.select(tfNode, model, result, importArguments(tfNode, graph, model, result));
case "sigmoid": return operationMapper.map(importArguments(tfNode, graph, model, result), ScalarFunctions.sigmoid());
+ case "squareddifference" : return operationMapper.join(importArguments(tfNode, graph, model, result), ScalarFunctions.squareddifference());
+ case "subtract" : case "sub" : return operationMapper.join(importArguments(tfNode, graph, model, result), ScalarFunctions.subtract());
+
+ // nn ops
+ case "biasadd" : return operationMapper.join(importArguments(tfNode, graph, model, result), ScalarFunctions.add());
+ case "elu": return operationMapper.map(importArguments(tfNode, graph, model, result), ScalarFunctions.elu());
+ case "relu": return operationMapper.map(importArguments(tfNode, graph, model, result), ScalarFunctions.relu());
+ case "selu": return operationMapper.map(importArguments(tfNode, graph, model, result), ScalarFunctions.selu());
case "softmax" : return operationMapper.softmax(importArguments(tfNode, graph, model, result));
- default : throw new IllegalArgumentException("Conversion of TensorFlow operation '" + tfNode.getOp() + "' is not supported");
+
+ // evaluation no-ops
+ case "stopgradient" :
+ case "noop":
+ return operationMapper.noOp(importArguments(tfNode, graph, model, result));
+
+ // not supported
+ default :
+ throw new IllegalArgumentException("Conversion of TensorFlow operation '" + tfNode.getOp() + "' is not supported (" + tfNode.getName() + ")");
}
}
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowModel.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowModel.java
index 9fdc45ab3bc..1a6c93384ea 100644
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowModel.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowModel.java
@@ -24,10 +24,12 @@ public class TensorFlowModel {
private final Map<String, TensorType> arguments = new HashMap<>();
private final Map<String, Tensor> constants = new HashMap<>();
private final Map<String, RankingExpression> expressions = new HashMap<>();
+ private final Map<String, RankingExpression> macros = new HashMap<>();
void argument(String name, TensorType argumentType) { arguments.put(name, argumentType); }
void constant(String name, Tensor constant) { constants.put(name, constant); }
void expression(String name, RankingExpression expression) { expressions.put(name, expression); }
+ void macro(String name, RankingExpression expression) { macros.put(name, expression); }
/** Returns the given signature. If it does not already exist it is added to this. */
Signature signature(String name) {
@@ -47,6 +49,11 @@ public class TensorFlowModel {
*/
public Map<String, RankingExpression> expressions() { return Collections.unmodifiableMap(expressions); }
+ /**
+ * Returns an immutable map of expressions that can be overridden - such as PlaceholderWithDefault/
+ */
+ public Map<String, RankingExpression> macros() { return Collections.unmodifiableMap(macros); }
+
/** Returns an immutable map of the signatures of this */
public Map<String, Signature> signatures() { return Collections.unmodifiableMap(signatures); }
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java
index 1632a17748c..69df572272a 100755
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java
@@ -10,7 +10,7 @@ import java.util.Deque;
* An opaque name in a ranking expression. This is used to represent names passed to the context
* and interpreted by the given context in a way which is opaque to the ranking expressions.
*
- * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
+ * @author Simon Thoresen
*/
public final class NameNode extends ExpressionNode {
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java
index ff2c9d8ea6d..139709998b4 100755
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java
@@ -72,7 +72,7 @@ public final class ReferenceNode extends CompositeNode {
myArguments = null;
myOutput = null;
} else if (context.getFunction(myName) != null) {
- // Replace this whole node with a reference to another script.
+ // Replace by the referenced expression
ExpressionFunction function = context.getFunction(myName);
if (function != null && myArguments != null && function.arguments().size() == myArguments.size() && myOutput == null) {
String myPath = name + this.arguments.expressions();
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TensorFunctionNode.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TensorFunctionNode.java
index 8af3448ca6f..b42570d3aea 100644
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TensorFunctionNode.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TensorFunctionNode.java
@@ -139,7 +139,9 @@ public class TensorFunctionNode extends CompositeNode {
final Deque<String> path;
final CompositeNode parent;
- public static final ExpressionNodeToStringContext empty = new ExpressionNodeToStringContext(null, null, null);
+ public static final ExpressionNodeToStringContext empty = new ExpressionNodeToStringContext(new SerializationContext(),
+ null,
+ null);
public ExpressionNodeToStringContext(SerializationContext context, Deque<String> path, CompositeNode parent) {
this.context = context;
diff --git a/searchlib/src/main/javacc/RankingExpressionParser.jj b/searchlib/src/main/javacc/RankingExpressionParser.jj
index febd0a60bb3..a796eaa4ac0 100755
--- a/searchlib/src/main/javacc/RankingExpressionParser.jj
+++ b/searchlib/src/main/javacc/RankingExpressionParser.jj
@@ -242,7 +242,7 @@ ExpressionNode value() :
LOOKAHEAD(2) ret = ifExpression() |
LOOKAHEAD(4) ret = function() |
ret = feature() |
- ret = queryFeature() |
+ ret = legacyQueryFeature() |
( <LBRACE> ret = expression() <RBRACE> { ret = new EmbracedNode(ret); } ) ) )
{
ret = not ? new NotNode(ret) : ret;
@@ -264,15 +264,6 @@ IfNode ifExpression() :
}
}
-ReferenceNode queryFeature() :
-{
- String name;
-}
-{
- ( <DOLLAR> name = identifier() )
- { return new ReferenceNode("query", Arrays.asList((ExpressionNode)new NameNode(name)), null); }
-}
-
ReferenceNode feature() :
{
List<ExpressionNode> args = null;
@@ -283,6 +274,16 @@ ReferenceNode feature() :
{ return new ReferenceNode(name, args, out); }
}
+// Query features can be referenced as "$name" instead of "query(name)". TODO: Warn this is deprecated
+ReferenceNode legacyQueryFeature() :
+{
+ String name;
+}
+{
+ ( <DOLLAR> name = identifier() )
+ { return new ReferenceNode("query", Arrays.asList((ExpressionNode)new NameNode(name)), null); }
+}
+
String outs() :
{
StringBuilder ret = new StringBuilder();
@@ -333,7 +334,7 @@ ExpressionNode arg() :
{
( ret = constantPrimitive() |
LOOKAHEAD(2) ret = feature() |
- name = identifier() { ret = new NameNode(name); } )
+ name = identifier() { ret = new NameNode(name); } )
{ return ret; }
}
@@ -342,7 +343,7 @@ ExpressionNode function() :
ExpressionNode function;
}
{
- ( function = scalarOrTensorFunction() | function = tensorFunction() )
+ ( LOOKAHEAD(2) function = scalarOrTensorFunction() | function = tensorFunction() )
{ return function; }
}
@@ -717,7 +718,7 @@ String identifier() :
Function func;
}
{
- name = tensorFunctionName() { return name; } |
+ LOOKAHEAD(2) name = tensorFunctionName() { return name; } |
func = unaryFunctionName() { return func.toString(); } |
func = binaryFunctionName() { return func.toString(); } |
<IF> { return token.image; } |
@@ -770,11 +771,25 @@ List<String> tagCommaLeadingList() :
ConstantNode constantPrimitive() :
{
String sign = "";
+ String value;
}
{
( <SUB> { sign = "-";} ) ?
- ( <INTEGER> | <FLOAT> | <STRING> )
- { return new ConstantNode(Value.parse(sign + token.image),sign + token.image); }
+ ( <INTEGER> { value = token.image; } |
+ <FLOAT> { value = token.image; } |
+ value = stringPath() )
+ { return new ConstantNode(Value.parse(sign + value),sign + value); }
+}
+
+// Strings separated by "/"
+String stringPath() :
+{
+ StringBuilder b = new StringBuilder();
+}
+{
+ <STRING> { b.append(token.image); }
+ ( LOOKAHEAD(2) <DIV> <STRING> { b.append("/").append(token.image); } ) *
+ { return b.toString(); }
}
Value primitiveValue() :
diff --git a/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/saved_model.pbtxt b/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/saved_model.pbtxt
deleted file mode 100644
index c8f7ecf11f8..00000000000
--- a/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/saved_model.pbtxt
+++ /dev/null
@@ -1,8550 +0,0 @@
-saved_model_schema_version: 1
-meta_graphs {
- meta_info_def {
- stripped_op_list {
- op {
- name: "Add"
- input_arg {
- name: "x"
- type_attr: "T"
- }
- input_arg {
- name: "y"
- type_attr: "T"
- }
- output_arg {
- name: "z"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_UINT8
- type: DT_INT8
- type: DT_INT16
- type: DT_INT32
- type: DT_INT64
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- type: DT_STRING
- }
- }
- }
- }
- op {
- name: "ApplyGradientDescent"
- input_arg {
- name: "var"
- type_attr: "T"
- is_ref: true
- }
- input_arg {
- name: "alpha"
- type_attr: "T"
- }
- input_arg {
- name: "delta"
- type_attr: "T"
- }
- output_arg {
- name: "out"
- type_attr: "T"
- is_ref: true
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_INT64
- type: DT_INT32
- type: DT_UINT8
- type: DT_UINT16
- type: DT_INT16
- type: DT_INT8
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- type: DT_QINT8
- type: DT_QUINT8
- type: DT_QINT32
- type: DT_HALF
- }
- }
- }
- attr {
- name: "use_locking"
- type: "bool"
- default_value {
- b: false
- }
- }
- }
- op {
- name: "Assign"
- input_arg {
- name: "ref"
- type_attr: "T"
- is_ref: true
- }
- input_arg {
- name: "value"
- type_attr: "T"
- }
- output_arg {
- name: "output_ref"
- type_attr: "T"
- is_ref: true
- }
- attr {
- name: "T"
- type: "type"
- }
- attr {
- name: "validate_shape"
- type: "bool"
- default_value {
- b: true
- }
- }
- attr {
- name: "use_locking"
- type: "bool"
- default_value {
- b: true
- }
- }
- allows_uninitialized_input: true
- }
- op {
- name: "BroadcastGradientArgs"
- input_arg {
- name: "s0"
- type_attr: "T"
- }
- input_arg {
- name: "s1"
- type_attr: "T"
- }
- output_arg {
- name: "r0"
- type_attr: "T"
- }
- output_arg {
- name: "r1"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- default_value {
- type: DT_INT32
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "Cast"
- input_arg {
- name: "x"
- type_attr: "SrcT"
- }
- output_arg {
- name: "y"
- type_attr: "DstT"
- }
- attr {
- name: "SrcT"
- type: "type"
- }
- attr {
- name: "DstT"
- type: "type"
- }
- }
- op {
- name: "Const"
- output_arg {
- name: "output"
- type_attr: "dtype"
- }
- attr {
- name: "value"
- type: "tensor"
- }
- attr {
- name: "dtype"
- type: "type"
- }
- }
- op {
- name: "Elu"
- input_arg {
- name: "features"
- type_attr: "T"
- }
- output_arg {
- name: "activations"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- }
- }
- }
- }
- op {
- name: "EluGrad"
- input_arg {
- name: "gradients"
- type_attr: "T"
- }
- input_arg {
- name: "outputs"
- type_attr: "T"
- }
- output_arg {
- name: "backprops"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- }
- }
- }
- }
- op {
- name: "ExpandDims"
- input_arg {
- name: "input"
- type_attr: "T"
- }
- input_arg {
- name: "dim"
- type_attr: "Tdim"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- }
- attr {
- name: "Tdim"
- type: "type"
- default_value {
- type: DT_INT32
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "Fill"
- input_arg {
- name: "dims"
- type: DT_INT32
- }
- input_arg {
- name: "value"
- type_attr: "T"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- }
- }
- op {
- name: "FloorDiv"
- input_arg {
- name: "x"
- type_attr: "T"
- }
- input_arg {
- name: "y"
- type_attr: "T"
- }
- output_arg {
- name: "z"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_UINT8
- type: DT_INT8
- type: DT_UINT16
- type: DT_INT16
- type: DT_INT32
- type: DT_INT64
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- }
- }
- }
- }
- op {
- name: "Identity"
- input_arg {
- name: "input"
- type_attr: "T"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- }
- }
- op {
- name: "InTopKV2"
- input_arg {
- name: "predictions"
- type: DT_FLOAT
- }
- input_arg {
- name: "targets"
- type_attr: "T"
- }
- input_arg {
- name: "k"
- type_attr: "T"
- }
- output_arg {
- name: "precision"
- type: DT_BOOL
- }
- attr {
- name: "T"
- type: "type"
- default_value {
- type: DT_INT32
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "MatMul"
- input_arg {
- name: "a"
- type_attr: "T"
- }
- input_arg {
- name: "b"
- type_attr: "T"
- }
- output_arg {
- name: "product"
- type_attr: "T"
- }
- attr {
- name: "transpose_a"
- type: "bool"
- default_value {
- b: false
- }
- }
- attr {
- name: "transpose_b"
- type: "bool"
- default_value {
- b: false
- }
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_INT32
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- }
- }
- }
- }
- op {
- name: "Maximum"
- input_arg {
- name: "x"
- type_attr: "T"
- }
- input_arg {
- name: "y"
- type_attr: "T"
- }
- output_arg {
- name: "z"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- is_commutative: true
- }
- op {
- name: "Mean"
- input_arg {
- name: "input"
- type_attr: "T"
- }
- input_arg {
- name: "reduction_indices"
- type_attr: "Tidx"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "keep_dims"
- type: "bool"
- default_value {
- b: false
- }
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_INT64
- type: DT_INT32
- type: DT_UINT8
- type: DT_UINT16
- type: DT_INT16
- type: DT_INT8
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- type: DT_QINT8
- type: DT_QUINT8
- type: DT_QINT32
- type: DT_HALF
- }
- }
- }
- attr {
- name: "Tidx"
- type: "type"
- default_value {
- type: DT_INT32
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "MergeV2Checkpoints"
- input_arg {
- name: "checkpoint_prefixes"
- type: DT_STRING
- }
- input_arg {
- name: "destination_prefix"
- type: DT_STRING
- }
- attr {
- name: "delete_old_dirs"
- type: "bool"
- default_value {
- b: true
- }
- }
- is_stateful: true
- }
- op {
- name: "Mul"
- input_arg {
- name: "x"
- type_attr: "T"
- }
- input_arg {
- name: "y"
- type_attr: "T"
- }
- output_arg {
- name: "z"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_UINT8
- type: DT_INT8
- type: DT_UINT16
- type: DT_INT16
- type: DT_INT32
- type: DT_INT64
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- }
- }
- }
- is_commutative: true
- }
- op {
- name: "NoOp"
- }
- op {
- name: "Pack"
- input_arg {
- name: "values"
- type_attr: "T"
- number_attr: "N"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "N"
- type: "int"
- has_minimum: true
- minimum: 1
- }
- attr {
- name: "T"
- type: "type"
- }
- attr {
- name: "axis"
- type: "int"
- default_value {
- i: 0
- }
- }
- }
- op {
- name: "Placeholder"
- output_arg {
- name: "output"
- type_attr: "dtype"
- }
- attr {
- name: "dtype"
- type: "type"
- }
- attr {
- name: "shape"
- type: "shape"
- default_value {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- op {
- name: "PreventGradient"
- input_arg {
- name: "input"
- type_attr: "T"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- }
- attr {
- name: "message"
- type: "string"
- default_value {
- s: ""
- }
- }
- }
- op {
- name: "Prod"
- input_arg {
- name: "input"
- type_attr: "T"
- }
- input_arg {
- name: "reduction_indices"
- type_attr: "Tidx"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "keep_dims"
- type: "bool"
- default_value {
- b: false
- }
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_INT64
- type: DT_INT32
- type: DT_UINT8
- type: DT_UINT16
- type: DT_INT16
- type: DT_INT8
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- type: DT_QINT8
- type: DT_QUINT8
- type: DT_QINT32
- type: DT_HALF
- }
- }
- }
- attr {
- name: "Tidx"
- type: "type"
- default_value {
- type: DT_INT32
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "RealDiv"
- input_arg {
- name: "x"
- type_attr: "T"
- }
- input_arg {
- name: "y"
- type_attr: "T"
- }
- output_arg {
- name: "z"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_UINT8
- type: DT_INT8
- type: DT_UINT16
- type: DT_INT16
- type: DT_INT32
- type: DT_INT64
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- }
- }
- }
- }
- op {
- name: "Relu"
- input_arg {
- name: "features"
- type_attr: "T"
- }
- output_arg {
- name: "activations"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_INT32
- type: DT_INT64
- type: DT_UINT8
- type: DT_INT16
- type: DT_INT8
- type: DT_UINT16
- type: DT_HALF
- }
- }
- }
- }
- op {
- name: "ReluGrad"
- input_arg {
- name: "gradients"
- type_attr: "T"
- }
- input_arg {
- name: "features"
- type_attr: "T"
- }
- output_arg {
- name: "backprops"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_INT32
- type: DT_INT64
- type: DT_UINT8
- type: DT_INT16
- type: DT_INT8
- type: DT_UINT16
- type: DT_HALF
- }
- }
- }
- }
- op {
- name: "Reshape"
- input_arg {
- name: "tensor"
- type_attr: "T"
- }
- input_arg {
- name: "shape"
- type_attr: "Tshape"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- }
- attr {
- name: "Tshape"
- type: "type"
- default_value {
- type: DT_INT32
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "RestoreV2"
- input_arg {
- name: "prefix"
- type: DT_STRING
- }
- input_arg {
- name: "tensor_names"
- type: DT_STRING
- }
- input_arg {
- name: "shape_and_slices"
- type: DT_STRING
- }
- output_arg {
- name: "tensors"
- type_list_attr: "dtypes"
- }
- attr {
- name: "dtypes"
- type: "list(type)"
- has_minimum: true
- minimum: 1
- }
- is_stateful: true
- }
- op {
- name: "SaveV2"
- input_arg {
- name: "prefix"
- type: DT_STRING
- }
- input_arg {
- name: "tensor_names"
- type: DT_STRING
- }
- input_arg {
- name: "shape_and_slices"
- type: DT_STRING
- }
- input_arg {
- name: "tensors"
- type_list_attr: "dtypes"
- }
- attr {
- name: "dtypes"
- type: "list(type)"
- has_minimum: true
- minimum: 1
- }
- is_stateful: true
- }
- op {
- name: "ScalarSummary"
- input_arg {
- name: "tags"
- type: DT_STRING
- }
- input_arg {
- name: "values"
- type_attr: "T"
- }
- output_arg {
- name: "summary"
- type: DT_STRING
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_INT32
- type: DT_INT64
- type: DT_UINT8
- type: DT_INT16
- type: DT_INT8
- type: DT_UINT16
- type: DT_HALF
- }
- }
- }
- }
- op {
- name: "Shape"
- input_arg {
- name: "input"
- type_attr: "T"
- }
- output_arg {
- name: "output"
- type_attr: "out_type"
- }
- attr {
- name: "T"
- type: "type"
- }
- attr {
- name: "out_type"
- type: "type"
- default_value {
- type: DT_INT32
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "ShardedFilename"
- input_arg {
- name: "basename"
- type: DT_STRING
- }
- input_arg {
- name: "shard"
- type: DT_INT32
- }
- input_arg {
- name: "num_shards"
- type: DT_INT32
- }
- output_arg {
- name: "filename"
- type: DT_STRING
- }
- }
- op {
- name: "Sigmoid"
- input_arg {
- name: "x"
- type_attr: "T"
- }
- output_arg {
- name: "y"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- }
- }
- }
- }
- op {
- name: "SigmoidGrad"
- input_arg {
- name: "y"
- type_attr: "T"
- }
- input_arg {
- name: "dy"
- type_attr: "T"
- }
- output_arg {
- name: "z"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- }
- }
- }
- }
- op {
- name: "SparseSoftmaxCrossEntropyWithLogits"
- input_arg {
- name: "features"
- type_attr: "T"
- }
- input_arg {
- name: "labels"
- type_attr: "Tlabels"
- }
- output_arg {
- name: "loss"
- type_attr: "T"
- }
- output_arg {
- name: "backprop"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- }
- }
- }
- attr {
- name: "Tlabels"
- type: "type"
- default_value {
- type: DT_INT64
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "StringJoin"
- input_arg {
- name: "inputs"
- type: DT_STRING
- number_attr: "N"
- }
- output_arg {
- name: "output"
- type: DT_STRING
- }
- attr {
- name: "N"
- type: "int"
- has_minimum: true
- minimum: 1
- }
- attr {
- name: "separator"
- type: "string"
- default_value {
- s: ""
- }
- }
- }
- op {
- name: "Sum"
- input_arg {
- name: "input"
- type_attr: "T"
- }
- input_arg {
- name: "reduction_indices"
- type_attr: "Tidx"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "keep_dims"
- type: "bool"
- default_value {
- b: false
- }
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_FLOAT
- type: DT_DOUBLE
- type: DT_INT64
- type: DT_INT32
- type: DT_UINT8
- type: DT_UINT16
- type: DT_INT16
- type: DT_INT8
- type: DT_COMPLEX64
- type: DT_COMPLEX128
- type: DT_QINT8
- type: DT_QUINT8
- type: DT_QINT32
- type: DT_HALF
- }
- }
- }
- attr {
- name: "Tidx"
- type: "type"
- default_value {
- type: DT_INT32
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "Tile"
- input_arg {
- name: "input"
- type_attr: "T"
- }
- input_arg {
- name: "multiples"
- type_attr: "Tmultiples"
- }
- output_arg {
- name: "output"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- }
- attr {
- name: "Tmultiples"
- type: "type"
- default_value {
- type: DT_INT32
- }
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- }
- op {
- name: "TruncatedNormal"
- input_arg {
- name: "shape"
- type_attr: "T"
- }
- output_arg {
- name: "output"
- type_attr: "dtype"
- }
- attr {
- name: "seed"
- type: "int"
- default_value {
- i: 0
- }
- }
- attr {
- name: "seed2"
- type: "int"
- default_value {
- i: 0
- }
- }
- attr {
- name: "dtype"
- type: "type"
- allowed_values {
- list {
- type: DT_HALF
- type: DT_FLOAT
- type: DT_DOUBLE
- }
- }
- }
- attr {
- name: "T"
- type: "type"
- allowed_values {
- list {
- type: DT_INT32
- type: DT_INT64
- }
- }
- }
- is_stateful: true
- }
- op {
- name: "VariableV2"
- output_arg {
- name: "ref"
- type_attr: "dtype"
- is_ref: true
- }
- attr {
- name: "shape"
- type: "shape"
- }
- attr {
- name: "dtype"
- type: "type"
- }
- attr {
- name: "container"
- type: "string"
- default_value {
- s: ""
- }
- }
- attr {
- name: "shared_name"
- type: "string"
- default_value {
- s: ""
- }
- }
- is_stateful: true
- }
- op {
- name: "ZerosLike"
- input_arg {
- name: "x"
- type_attr: "T"
- }
- output_arg {
- name: "y"
- type_attr: "T"
- }
- attr {
- name: "T"
- type: "type"
- }
- }
- }
- tags: "serve"
- tensorflow_version: "1.4.1"
- tensorflow_git_version: "v1.4.0-19-ga52c8d9"
- }
- graph_def {
- node {
- name: "X"
- op: "Placeholder"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 784
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 784
- }
- }
- }
- }
- }
- node {
- name: "y"
- op: "Placeholder"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT64
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/truncated_normal/shape"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 2
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 2
- }
- }
- tensor_content: "\020\003\000\000,\001\000\000"
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/truncated_normal/mean"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 0.0
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/truncated_normal/stddev"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 0.0714285746216774
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/truncated_normal/TruncatedNormal"
- op: "TruncatedNormal"
- input: "dnn/hidden1/truncated_normal/shape"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "seed"
- value {
- i: 0
- }
- }
- attr {
- key: "seed2"
- value {
- i: 0
- }
- }
- }
- node {
- name: "dnn/hidden1/truncated_normal/mul"
- op: "Mul"
- input: "dnn/hidden1/truncated_normal/TruncatedNormal"
- input: "dnn/hidden1/truncated_normal/stddev"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/truncated_normal"
- op: "Add"
- input: "dnn/hidden1/truncated_normal/mul"
- input: "dnn/hidden1/truncated_normal/mean"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/weights"
- op: "VariableV2"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "container"
- value {
- s: ""
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- attr {
- key: "shared_name"
- value {
- s: ""
- }
- }
- }
- node {
- name: "dnn/hidden1/weights/Assign"
- op: "Assign"
- input: "dnn/hidden1/weights"
- input: "dnn/hidden1/truncated_normal"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden1/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "dnn/hidden1/weights/read"
- op: "Identity"
- input: "dnn/hidden1/weights"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden1/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/zeros"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- dim {
- size: 300
- }
- }
- float_val: 0.0
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/bias"
- op: "VariableV2"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "container"
- value {
- s: ""
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim {
- size: 300
- }
- }
- }
- }
- attr {
- key: "shared_name"
- value {
- s: ""
- }
- }
- }
- node {
- name: "dnn/hidden1/bias/Assign"
- op: "Assign"
- input: "dnn/hidden1/bias"
- input: "dnn/hidden1/zeros"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden1/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "dnn/hidden1/bias/read"
- op: "Identity"
- input: "dnn/hidden1/bias"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden1/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/MatMul"
- op: "MatMul"
- input: "X"
- input: "dnn/hidden1/weights/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: false
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: false
- }
- }
- }
- node {
- name: "dnn/hidden1/add"
- op: "Add"
- input: "dnn/hidden1/MatMul"
- input: "dnn/hidden1/bias/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden1/Elu"
- op: "Elu"
- input: "dnn/hidden1/add"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/truncated_normal/shape"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 2
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 2
- }
- }
- tensor_content: ",\001\000\000d\000\000\000"
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/truncated_normal/mean"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 0.0
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/truncated_normal/stddev"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 0.1154700517654419
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/truncated_normal/TruncatedNormal"
- op: "TruncatedNormal"
- input: "dnn/hidden2/truncated_normal/shape"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "seed"
- value {
- i: 0
- }
- }
- attr {
- key: "seed2"
- value {
- i: 0
- }
- }
- }
- node {
- name: "dnn/hidden2/truncated_normal/mul"
- op: "Mul"
- input: "dnn/hidden2/truncated_normal/TruncatedNormal"
- input: "dnn/hidden2/truncated_normal/stddev"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/truncated_normal"
- op: "Add"
- input: "dnn/hidden2/truncated_normal/mul"
- input: "dnn/hidden2/truncated_normal/mean"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/weights"
- op: "VariableV2"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "container"
- value {
- s: ""
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- attr {
- key: "shared_name"
- value {
- s: ""
- }
- }
- }
- node {
- name: "dnn/hidden2/weights/Assign"
- op: "Assign"
- input: "dnn/hidden2/weights"
- input: "dnn/hidden2/truncated_normal"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden2/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "dnn/hidden2/weights/read"
- op: "Identity"
- input: "dnn/hidden2/weights"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden2/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/zeros"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- dim {
- size: 100
- }
- }
- float_val: 0.0
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/bias"
- op: "VariableV2"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "container"
- value {
- s: ""
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim {
- size: 100
- }
- }
- }
- }
- attr {
- key: "shared_name"
- value {
- s: ""
- }
- }
- }
- node {
- name: "dnn/hidden2/bias/Assign"
- op: "Assign"
- input: "dnn/hidden2/bias"
- input: "dnn/hidden2/zeros"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden2/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "dnn/hidden2/bias/read"
- op: "Identity"
- input: "dnn/hidden2/bias"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden2/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/MatMul"
- op: "MatMul"
- input: "dnn/hidden1/Elu"
- input: "dnn/hidden2/weights/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: false
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: false
- }
- }
- }
- node {
- name: "dnn/hidden2/add"
- op: "Add"
- input: "dnn/hidden2/MatMul"
- input: "dnn/hidden2/bias/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden2/Relu"
- op: "Relu"
- input: "dnn/hidden2/add"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/truncated_normal/shape"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 2
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 2
- }
- }
- tensor_content: "d\000\000\000(\000\000\000"
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/truncated_normal/mean"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 0.0
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/truncated_normal/stddev"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 0.20000000298023224
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/truncated_normal/TruncatedNormal"
- op: "TruncatedNormal"
- input: "dnn/hidden3/truncated_normal/shape"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "seed"
- value {
- i: 0
- }
- }
- attr {
- key: "seed2"
- value {
- i: 0
- }
- }
- }
- node {
- name: "dnn/hidden3/truncated_normal/mul"
- op: "Mul"
- input: "dnn/hidden3/truncated_normal/TruncatedNormal"
- input: "dnn/hidden3/truncated_normal/stddev"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/truncated_normal"
- op: "Add"
- input: "dnn/hidden3/truncated_normal/mul"
- input: "dnn/hidden3/truncated_normal/mean"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/weights"
- op: "VariableV2"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "container"
- value {
- s: ""
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- attr {
- key: "shared_name"
- value {
- s: ""
- }
- }
- }
- node {
- name: "dnn/hidden3/weights/Assign"
- op: "Assign"
- input: "dnn/hidden3/weights"
- input: "dnn/hidden3/truncated_normal"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden3/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "dnn/hidden3/weights/read"
- op: "Identity"
- input: "dnn/hidden3/weights"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden3/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/zeros"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- dim {
- size: 40
- }
- }
- float_val: 0.0
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/bias"
- op: "VariableV2"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "container"
- value {
- s: ""
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim {
- size: 40
- }
- }
- }
- }
- attr {
- key: "shared_name"
- value {
- s: ""
- }
- }
- }
- node {
- name: "dnn/hidden3/bias/Assign"
- op: "Assign"
- input: "dnn/hidden3/bias"
- input: "dnn/hidden3/zeros"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden3/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "dnn/hidden3/bias/read"
- op: "Identity"
- input: "dnn/hidden3/bias"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden3/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/MatMul"
- op: "MatMul"
- input: "dnn/hidden2/Relu"
- input: "dnn/hidden3/weights/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: false
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: false
- }
- }
- }
- node {
- name: "dnn/hidden3/add"
- op: "Add"
- input: "dnn/hidden3/MatMul"
- input: "dnn/hidden3/bias/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/hidden3/Sigmoid"
- op: "Sigmoid"
- input: "dnn/hidden3/add"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/outputs/truncated_normal/shape"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 2
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 2
- }
- }
- tensor_content: "(\000\000\000\n\000\000\000"
- }
- }
- }
- }
- node {
- name: "dnn/outputs/truncated_normal/mean"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 0.0
- }
- }
- }
- }
- node {
- name: "dnn/outputs/truncated_normal/stddev"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 0.3162277638912201
- }
- }
- }
- }
- node {
- name: "dnn/outputs/truncated_normal/TruncatedNormal"
- op: "TruncatedNormal"
- input: "dnn/outputs/truncated_normal/shape"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "seed"
- value {
- i: 0
- }
- }
- attr {
- key: "seed2"
- value {
- i: 0
- }
- }
- }
- node {
- name: "dnn/outputs/truncated_normal/mul"
- op: "Mul"
- input: "dnn/outputs/truncated_normal/TruncatedNormal"
- input: "dnn/outputs/truncated_normal/stddev"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/outputs/truncated_normal"
- op: "Add"
- input: "dnn/outputs/truncated_normal/mul"
- input: "dnn/outputs/truncated_normal/mean"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/outputs/weights"
- op: "VariableV2"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "container"
- value {
- s: ""
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- attr {
- key: "shared_name"
- value {
- s: ""
- }
- }
- }
- node {
- name: "dnn/outputs/weights/Assign"
- op: "Assign"
- input: "dnn/outputs/weights"
- input: "dnn/outputs/truncated_normal"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/outputs/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "dnn/outputs/weights/read"
- op: "Identity"
- input: "dnn/outputs/weights"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/outputs/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/outputs/zeros"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- dim {
- size: 10
- }
- }
- float_val: 0.0
- }
- }
- }
- }
- node {
- name: "dnn/outputs/bias"
- op: "VariableV2"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "container"
- value {
- s: ""
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim {
- size: 10
- }
- }
- }
- }
- attr {
- key: "shared_name"
- value {
- s: ""
- }
- }
- }
- node {
- name: "dnn/outputs/bias/Assign"
- op: "Assign"
- input: "dnn/outputs/bias"
- input: "dnn/outputs/zeros"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/outputs/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "dnn/outputs/bias/read"
- op: "Identity"
- input: "dnn/outputs/bias"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/outputs/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "dnn/outputs/MatMul"
- op: "MatMul"
- input: "dnn/hidden3/Sigmoid"
- input: "dnn/outputs/weights/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: false
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: false
- }
- }
- }
- node {
- name: "dnn/outputs/add"
- op: "Add"
- input: "dnn/outputs/MatMul"
- input: "dnn/outputs/bias/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "loss/SparseSoftmaxCrossEntropyWithLogits/Shape"
- op: "Shape"
- input: "y"
- attr {
- key: "T"
- value {
- type: DT_INT64
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- }
- }
- }
- attr {
- key: "out_type"
- value {
- type: DT_INT32
- }
- }
- }
- node {
- name: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits"
- op: "SparseSoftmaxCrossEntropyWithLogits"
- input: "dnn/outputs/add"
- input: "y"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tlabels"
- value {
- type: DT_INT64
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- shape {
- dim {
- size: -1
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "loss/Const"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 1
- }
- }
- int_val: 0
- }
- }
- }
- }
- node {
- name: "loss/loss"
- op: "Mean"
- input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits"
- input: "loss/Const"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/Shape"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/Const"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 1.0
- }
- }
- }
- }
- node {
- name: "train/gradients/Fill"
- op: "Fill"
- input: "train/gradients/Shape"
- input: "train/gradients/Const"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Reshape/shape"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 1
- }
- }
- int_val: 1
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Reshape"
- op: "Reshape"
- input: "train/gradients/Fill"
- input: "train/gradients/loss/loss_grad/Reshape/shape"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tshape"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Shape"
- op: "Shape"
- input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "out_type"
- value {
- type: DT_INT32
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Tile"
- op: "Tile"
- input: "train/gradients/loss/loss_grad/Reshape"
- input: "train/gradients/loss/loss_grad/Shape"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tmultiples"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Shape_1"
- op: "Shape"
- input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "out_type"
- value {
- type: DT_INT32
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Shape_2"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Const"
- op: "Const"
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/loss/loss_grad/Shape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 1
- }
- }
- int_val: 0
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Prod"
- op: "Prod"
- input: "train/gradients/loss/loss_grad/Shape_1"
- input: "train/gradients/loss/loss_grad/Const"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/loss/loss_grad/Shape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Const_1"
- op: "Const"
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/loss/loss_grad/Shape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 1
- }
- }
- int_val: 0
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Prod_1"
- op: "Prod"
- input: "train/gradients/loss/loss_grad/Shape_2"
- input: "train/gradients/loss/loss_grad/Const_1"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/loss/loss_grad/Shape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Maximum/y"
- op: "Const"
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/loss/loss_grad/Shape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- }
- int_val: 1
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Maximum"
- op: "Maximum"
- input: "train/gradients/loss/loss_grad/Prod_1"
- input: "train/gradients/loss/loss_grad/Maximum/y"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/loss/loss_grad/Shape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/floordiv"
- op: "FloorDiv"
- input: "train/gradients/loss/loss_grad/Prod"
- input: "train/gradients/loss/loss_grad/Maximum"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/loss/loss_grad/Shape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/Cast"
- op: "Cast"
- input: "train/gradients/loss/loss_grad/floordiv"
- attr {
- key: "DstT"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "SrcT"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/loss_grad/truediv"
- op: "RealDiv"
- input: "train/gradients/loss/loss_grad/Tile"
- input: "train/gradients/loss/loss_grad/Cast"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/zeros_like"
- op: "ZerosLike"
- input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits:1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/PreventGradient"
- op: "PreventGradient"
- input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits:1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "message"
- value {
- s: "Currently there is no way to take the second derivative of sparse_softmax_cross_entropy_with_logits due to the fused implementation\'s interaction with tf.gradients()"
- }
- }
- }
- node {
- name: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/ExpandDims/dim"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- }
- int_val: -1
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/ExpandDims"
- op: "ExpandDims"
- input: "train/gradients/loss/loss_grad/truediv"
- input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/ExpandDims/dim"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tdim"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 1
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/mul"
- op: "Mul"
- input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/ExpandDims"
- input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/PreventGradient"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/Shape"
- op: "Shape"
- input: "dnn/outputs/MatMul"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 2
- }
- }
- }
- }
- }
- attr {
- key: "out_type"
- value {
- type: DT_INT32
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/Shape_1"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 1
- }
- }
- int_val: 10
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/BroadcastGradientArgs"
- op: "BroadcastGradientArgs"
- input: "train/gradients/dnn/outputs/add_grad/Shape"
- input: "train/gradients/dnn/outputs/add_grad/Shape_1"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- shape {
- dim {
- size: -1
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/Sum"
- op: "Sum"
- input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/mul"
- input: "train/gradients/dnn/outputs/add_grad/BroadcastGradientArgs"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/Reshape"
- op: "Reshape"
- input: "train/gradients/dnn/outputs/add_grad/Sum"
- input: "train/gradients/dnn/outputs/add_grad/Shape"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tshape"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/Sum_1"
- op: "Sum"
- input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/mul"
- input: "train/gradients/dnn/outputs/add_grad/BroadcastGradientArgs:1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/Reshape_1"
- op: "Reshape"
- input: "train/gradients/dnn/outputs/add_grad/Sum_1"
- input: "train/gradients/dnn/outputs/add_grad/Shape_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tshape"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/tuple/group_deps"
- op: "NoOp"
- input: "^train/gradients/dnn/outputs/add_grad/Reshape"
- input: "^train/gradients/dnn/outputs/add_grad/Reshape_1"
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/tuple/control_dependency"
- op: "Identity"
- input: "train/gradients/dnn/outputs/add_grad/Reshape"
- input: "^train/gradients/dnn/outputs/add_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/outputs/add_grad/Reshape"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/add_grad/tuple/control_dependency_1"
- op: "Identity"
- input: "train/gradients/dnn/outputs/add_grad/Reshape_1"
- input: "^train/gradients/dnn/outputs/add_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/outputs/add_grad/Reshape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/MatMul_grad/MatMul"
- op: "MatMul"
- input: "train/gradients/dnn/outputs/add_grad/tuple/control_dependency"
- input: "dnn/outputs/weights/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: false
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: true
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/MatMul_grad/MatMul_1"
- op: "MatMul"
- input: "dnn/hidden3/Sigmoid"
- input: "train/gradients/dnn/outputs/add_grad/tuple/control_dependency"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: true
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/MatMul_grad/tuple/group_deps"
- op: "NoOp"
- input: "^train/gradients/dnn/outputs/MatMul_grad/MatMul"
- input: "^train/gradients/dnn/outputs/MatMul_grad/MatMul_1"
- }
- node {
- name: "train/gradients/dnn/outputs/MatMul_grad/tuple/control_dependency"
- op: "Identity"
- input: "train/gradients/dnn/outputs/MatMul_grad/MatMul"
- input: "^train/gradients/dnn/outputs/MatMul_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/outputs/MatMul_grad/MatMul"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/outputs/MatMul_grad/tuple/control_dependency_1"
- op: "Identity"
- input: "train/gradients/dnn/outputs/MatMul_grad/MatMul_1"
- input: "^train/gradients/dnn/outputs/MatMul_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/outputs/MatMul_grad/MatMul_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/Sigmoid_grad/SigmoidGrad"
- op: "SigmoidGrad"
- input: "dnn/hidden3/Sigmoid"
- input: "train/gradients/dnn/outputs/MatMul_grad/tuple/control_dependency"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/Shape"
- op: "Shape"
- input: "dnn/hidden3/MatMul"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 2
- }
- }
- }
- }
- }
- attr {
- key: "out_type"
- value {
- type: DT_INT32
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/Shape_1"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 1
- }
- }
- int_val: 40
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/BroadcastGradientArgs"
- op: "BroadcastGradientArgs"
- input: "train/gradients/dnn/hidden3/add_grad/Shape"
- input: "train/gradients/dnn/hidden3/add_grad/Shape_1"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- shape {
- dim {
- size: -1
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/Sum"
- op: "Sum"
- input: "train/gradients/dnn/hidden3/Sigmoid_grad/SigmoidGrad"
- input: "train/gradients/dnn/hidden3/add_grad/BroadcastGradientArgs"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/Reshape"
- op: "Reshape"
- input: "train/gradients/dnn/hidden3/add_grad/Sum"
- input: "train/gradients/dnn/hidden3/add_grad/Shape"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tshape"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/Sum_1"
- op: "Sum"
- input: "train/gradients/dnn/hidden3/Sigmoid_grad/SigmoidGrad"
- input: "train/gradients/dnn/hidden3/add_grad/BroadcastGradientArgs:1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/Reshape_1"
- op: "Reshape"
- input: "train/gradients/dnn/hidden3/add_grad/Sum_1"
- input: "train/gradients/dnn/hidden3/add_grad/Shape_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tshape"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/tuple/group_deps"
- op: "NoOp"
- input: "^train/gradients/dnn/hidden3/add_grad/Reshape"
- input: "^train/gradients/dnn/hidden3/add_grad/Reshape_1"
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/tuple/control_dependency"
- op: "Identity"
- input: "train/gradients/dnn/hidden3/add_grad/Reshape"
- input: "^train/gradients/dnn/hidden3/add_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden3/add_grad/Reshape"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/add_grad/tuple/control_dependency_1"
- op: "Identity"
- input: "train/gradients/dnn/hidden3/add_grad/Reshape_1"
- input: "^train/gradients/dnn/hidden3/add_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden3/add_grad/Reshape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/MatMul_grad/MatMul"
- op: "MatMul"
- input: "train/gradients/dnn/hidden3/add_grad/tuple/control_dependency"
- input: "dnn/hidden3/weights/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: false
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: true
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/MatMul_grad/MatMul_1"
- op: "MatMul"
- input: "dnn/hidden2/Relu"
- input: "train/gradients/dnn/hidden3/add_grad/tuple/control_dependency"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: true
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/MatMul_grad/tuple/group_deps"
- op: "NoOp"
- input: "^train/gradients/dnn/hidden3/MatMul_grad/MatMul"
- input: "^train/gradients/dnn/hidden3/MatMul_grad/MatMul_1"
- }
- node {
- name: "train/gradients/dnn/hidden3/MatMul_grad/tuple/control_dependency"
- op: "Identity"
- input: "train/gradients/dnn/hidden3/MatMul_grad/MatMul"
- input: "^train/gradients/dnn/hidden3/MatMul_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden3/MatMul_grad/MatMul"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden3/MatMul_grad/tuple/control_dependency_1"
- op: "Identity"
- input: "train/gradients/dnn/hidden3/MatMul_grad/MatMul_1"
- input: "^train/gradients/dnn/hidden3/MatMul_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden3/MatMul_grad/MatMul_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/Relu_grad/ReluGrad"
- op: "ReluGrad"
- input: "train/gradients/dnn/hidden3/MatMul_grad/tuple/control_dependency"
- input: "dnn/hidden2/Relu"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/Shape"
- op: "Shape"
- input: "dnn/hidden2/MatMul"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 2
- }
- }
- }
- }
- }
- attr {
- key: "out_type"
- value {
- type: DT_INT32
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/Shape_1"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 1
- }
- }
- int_val: 100
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/BroadcastGradientArgs"
- op: "BroadcastGradientArgs"
- input: "train/gradients/dnn/hidden2/add_grad/Shape"
- input: "train/gradients/dnn/hidden2/add_grad/Shape_1"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- shape {
- dim {
- size: -1
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/Sum"
- op: "Sum"
- input: "train/gradients/dnn/hidden2/Relu_grad/ReluGrad"
- input: "train/gradients/dnn/hidden2/add_grad/BroadcastGradientArgs"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/Reshape"
- op: "Reshape"
- input: "train/gradients/dnn/hidden2/add_grad/Sum"
- input: "train/gradients/dnn/hidden2/add_grad/Shape"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tshape"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/Sum_1"
- op: "Sum"
- input: "train/gradients/dnn/hidden2/Relu_grad/ReluGrad"
- input: "train/gradients/dnn/hidden2/add_grad/BroadcastGradientArgs:1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/Reshape_1"
- op: "Reshape"
- input: "train/gradients/dnn/hidden2/add_grad/Sum_1"
- input: "train/gradients/dnn/hidden2/add_grad/Shape_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tshape"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/tuple/group_deps"
- op: "NoOp"
- input: "^train/gradients/dnn/hidden2/add_grad/Reshape"
- input: "^train/gradients/dnn/hidden2/add_grad/Reshape_1"
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/tuple/control_dependency"
- op: "Identity"
- input: "train/gradients/dnn/hidden2/add_grad/Reshape"
- input: "^train/gradients/dnn/hidden2/add_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden2/add_grad/Reshape"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/add_grad/tuple/control_dependency_1"
- op: "Identity"
- input: "train/gradients/dnn/hidden2/add_grad/Reshape_1"
- input: "^train/gradients/dnn/hidden2/add_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden2/add_grad/Reshape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/MatMul_grad/MatMul"
- op: "MatMul"
- input: "train/gradients/dnn/hidden2/add_grad/tuple/control_dependency"
- input: "dnn/hidden2/weights/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: false
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: true
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/MatMul_grad/MatMul_1"
- op: "MatMul"
- input: "dnn/hidden1/Elu"
- input: "train/gradients/dnn/hidden2/add_grad/tuple/control_dependency"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: true
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/MatMul_grad/tuple/group_deps"
- op: "NoOp"
- input: "^train/gradients/dnn/hidden2/MatMul_grad/MatMul"
- input: "^train/gradients/dnn/hidden2/MatMul_grad/MatMul_1"
- }
- node {
- name: "train/gradients/dnn/hidden2/MatMul_grad/tuple/control_dependency"
- op: "Identity"
- input: "train/gradients/dnn/hidden2/MatMul_grad/MatMul"
- input: "^train/gradients/dnn/hidden2/MatMul_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden2/MatMul_grad/MatMul"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden2/MatMul_grad/tuple/control_dependency_1"
- op: "Identity"
- input: "train/gradients/dnn/hidden2/MatMul_grad/MatMul_1"
- input: "^train/gradients/dnn/hidden2/MatMul_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden2/MatMul_grad/MatMul_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/Elu_grad/EluGrad"
- op: "EluGrad"
- input: "train/gradients/dnn/hidden2/MatMul_grad/tuple/control_dependency"
- input: "dnn/hidden1/Elu"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/Shape"
- op: "Shape"
- input: "dnn/hidden1/MatMul"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 2
- }
- }
- }
- }
- }
- attr {
- key: "out_type"
- value {
- type: DT_INT32
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/Shape_1"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 1
- }
- }
- int_val: 300
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/BroadcastGradientArgs"
- op: "BroadcastGradientArgs"
- input: "train/gradients/dnn/hidden1/add_grad/Shape"
- input: "train/gradients/dnn/hidden1/add_grad/Shape_1"
- attr {
- key: "T"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- shape {
- dim {
- size: -1
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/Sum"
- op: "Sum"
- input: "train/gradients/dnn/hidden1/Elu_grad/EluGrad"
- input: "train/gradients/dnn/hidden1/add_grad/BroadcastGradientArgs"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/Reshape"
- op: "Reshape"
- input: "train/gradients/dnn/hidden1/add_grad/Sum"
- input: "train/gradients/dnn/hidden1/add_grad/Shape"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tshape"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/Sum_1"
- op: "Sum"
- input: "train/gradients/dnn/hidden1/Elu_grad/EluGrad"
- input: "train/gradients/dnn/hidden1/add_grad/BroadcastGradientArgs:1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/Reshape_1"
- op: "Reshape"
- input: "train/gradients/dnn/hidden1/add_grad/Sum_1"
- input: "train/gradients/dnn/hidden1/add_grad/Shape_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tshape"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/tuple/group_deps"
- op: "NoOp"
- input: "^train/gradients/dnn/hidden1/add_grad/Reshape"
- input: "^train/gradients/dnn/hidden1/add_grad/Reshape_1"
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/tuple/control_dependency"
- op: "Identity"
- input: "train/gradients/dnn/hidden1/add_grad/Reshape"
- input: "^train/gradients/dnn/hidden1/add_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden1/add_grad/Reshape"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/add_grad/tuple/control_dependency_1"
- op: "Identity"
- input: "train/gradients/dnn/hidden1/add_grad/Reshape_1"
- input: "^train/gradients/dnn/hidden1/add_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden1/add_grad/Reshape_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/MatMul_grad/MatMul"
- op: "MatMul"
- input: "train/gradients/dnn/hidden1/add_grad/tuple/control_dependency"
- input: "dnn/hidden1/weights/read"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 784
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: false
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: true
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/MatMul_grad/MatMul_1"
- op: "MatMul"
- input: "X"
- input: "train/gradients/dnn/hidden1/add_grad/tuple/control_dependency"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "transpose_a"
- value {
- b: true
- }
- }
- attr {
- key: "transpose_b"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/MatMul_grad/tuple/group_deps"
- op: "NoOp"
- input: "^train/gradients/dnn/hidden1/MatMul_grad/MatMul"
- input: "^train/gradients/dnn/hidden1/MatMul_grad/MatMul_1"
- }
- node {
- name: "train/gradients/dnn/hidden1/MatMul_grad/tuple/control_dependency"
- op: "Identity"
- input: "train/gradients/dnn/hidden1/MatMul_grad/MatMul"
- input: "^train/gradients/dnn/hidden1/MatMul_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden1/MatMul_grad/MatMul"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- dim {
- size: 784
- }
- }
- }
- }
- }
- }
- node {
- name: "train/gradients/dnn/hidden1/MatMul_grad/tuple/control_dependency_1"
- op: "Identity"
- input: "train/gradients/dnn/hidden1/MatMul_grad/MatMul_1"
- input: "^train/gradients/dnn/hidden1/MatMul_grad/tuple/group_deps"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@train/gradients/dnn/hidden1/MatMul_grad/MatMul_1"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- }
- node {
- name: "train/GradientDescent/learning_rate"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- }
- float_val: 0.009999999776482582
- }
- }
- }
- }
- node {
- name: "train/GradientDescent/update_dnn/hidden1/weights/ApplyGradientDescent"
- op: "ApplyGradientDescent"
- input: "dnn/hidden1/weights"
- input: "train/GradientDescent/learning_rate"
- input: "train/gradients/dnn/hidden1/MatMul_grad/tuple/control_dependency_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden1/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/GradientDescent/update_dnn/hidden1/bias/ApplyGradientDescent"
- op: "ApplyGradientDescent"
- input: "dnn/hidden1/bias"
- input: "train/GradientDescent/learning_rate"
- input: "train/gradients/dnn/hidden1/add_grad/tuple/control_dependency_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden1/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/GradientDescent/update_dnn/hidden2/weights/ApplyGradientDescent"
- op: "ApplyGradientDescent"
- input: "dnn/hidden2/weights"
- input: "train/GradientDescent/learning_rate"
- input: "train/gradients/dnn/hidden2/MatMul_grad/tuple/control_dependency_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden2/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/GradientDescent/update_dnn/hidden2/bias/ApplyGradientDescent"
- op: "ApplyGradientDescent"
- input: "dnn/hidden2/bias"
- input: "train/GradientDescent/learning_rate"
- input: "train/gradients/dnn/hidden2/add_grad/tuple/control_dependency_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden2/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/GradientDescent/update_dnn/hidden3/weights/ApplyGradientDescent"
- op: "ApplyGradientDescent"
- input: "dnn/hidden3/weights"
- input: "train/GradientDescent/learning_rate"
- input: "train/gradients/dnn/hidden3/MatMul_grad/tuple/control_dependency_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden3/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/GradientDescent/update_dnn/hidden3/bias/ApplyGradientDescent"
- op: "ApplyGradientDescent"
- input: "dnn/hidden3/bias"
- input: "train/GradientDescent/learning_rate"
- input: "train/gradients/dnn/hidden3/add_grad/tuple/control_dependency_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden3/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/GradientDescent/update_dnn/outputs/weights/ApplyGradientDescent"
- op: "ApplyGradientDescent"
- input: "dnn/outputs/weights"
- input: "train/GradientDescent/learning_rate"
- input: "train/gradients/dnn/outputs/MatMul_grad/tuple/control_dependency_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/outputs/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/GradientDescent/update_dnn/outputs/bias/ApplyGradientDescent"
- op: "ApplyGradientDescent"
- input: "dnn/outputs/bias"
- input: "train/GradientDescent/learning_rate"
- input: "train/gradients/dnn/outputs/add_grad/tuple/control_dependency_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/outputs/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: false
- }
- }
- }
- node {
- name: "train/GradientDescent"
- op: "NoOp"
- input: "^train/GradientDescent/update_dnn/hidden1/weights/ApplyGradientDescent"
- input: "^train/GradientDescent/update_dnn/hidden1/bias/ApplyGradientDescent"
- input: "^train/GradientDescent/update_dnn/hidden2/weights/ApplyGradientDescent"
- input: "^train/GradientDescent/update_dnn/hidden2/bias/ApplyGradientDescent"
- input: "^train/GradientDescent/update_dnn/hidden3/weights/ApplyGradientDescent"
- input: "^train/GradientDescent/update_dnn/hidden3/bias/ApplyGradientDescent"
- input: "^train/GradientDescent/update_dnn/outputs/weights/ApplyGradientDescent"
- input: "^train/GradientDescent/update_dnn/outputs/bias/ApplyGradientDescent"
- }
- node {
- name: "eval/in_top_k/InTopKV2/k"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT64
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT64
- tensor_shape {
- }
- int64_val: 1
- }
- }
- }
- }
- node {
- name: "eval/in_top_k/InTopKV2"
- op: "InTopKV2"
- input: "dnn/outputs/add"
- input: "y"
- input: "eval/in_top_k/InTopKV2/k"
- attr {
- key: "T"
- value {
- type: DT_INT64
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- }
- }
- }
- }
- node {
- name: "eval/Cast"
- op: "Cast"
- input: "eval/in_top_k/InTopKV2"
- attr {
- key: "DstT"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "SrcT"
- value {
- type: DT_BOOL
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: -1
- }
- }
- }
- }
- }
- }
- node {
- name: "eval/Const"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- dim {
- size: 1
- }
- }
- int_val: 0
- }
- }
- }
- }
- node {
- name: "eval/Mean"
- op: "Mean"
- input: "eval/Cast"
- input: "eval/Const"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "Tidx"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "keep_dims"
- value {
- b: false
- }
- }
- }
- node {
- name: "init"
- op: "NoOp"
- input: "^dnn/hidden1/weights/Assign"
- input: "^dnn/hidden1/bias/Assign"
- input: "^dnn/hidden2/weights/Assign"
- input: "^dnn/hidden2/bias/Assign"
- input: "^dnn/hidden3/weights/Assign"
- input: "^dnn/hidden3/bias/Assign"
- input: "^dnn/outputs/weights/Assign"
- input: "^dnn/outputs/bias/Assign"
- }
- node {
- name: "Accuracy/tags"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- }
- string_val: "Accuracy"
- }
- }
- }
- }
- node {
- name: "Accuracy"
- op: "ScalarSummary"
- input: "Accuracy/tags"
- input: "eval/Mean"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- }
- node {
- name: "save/Const"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- }
- string_val: "model"
- }
- }
- }
- }
- node {
- name: "save/StringJoin/inputs_1"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- }
- string_val: "_temp_b37397c1a53b45c6ad354497f210d9d4/part"
- }
- }
- }
- }
- node {
- name: "save/StringJoin"
- op: "StringJoin"
- input: "save/Const"
- input: "save/StringJoin/inputs_1"
- attr {
- key: "N"
- value {
- i: 2
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "separator"
- value {
- s: ""
- }
- }
- }
- node {
- name: "save/num_shards"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- }
- int_val: 1
- }
- }
- }
- }
- node {
- name: "save/ShardedFilename/shard"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_INT32
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_INT32
- tensor_shape {
- }
- int_val: 0
- }
- }
- }
- }
- node {
- name: "save/ShardedFilename"
- op: "ShardedFilename"
- input: "save/StringJoin"
- input: "save/ShardedFilename/shard"
- input: "save/num_shards"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- }
- node {
- name: "save/SaveV2/tensor_names"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 8
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 8
- }
- }
- string_val: "dnn/hidden1/bias"
- string_val: "dnn/hidden1/weights"
- string_val: "dnn/hidden2/bias"
- string_val: "dnn/hidden2/weights"
- string_val: "dnn/hidden3/bias"
- string_val: "dnn/hidden3/weights"
- string_val: "dnn/outputs/bias"
- string_val: "dnn/outputs/weights"
- }
- }
- }
- }
- node {
- name: "save/SaveV2/shape_and_slices"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 8
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 8
- }
- }
- string_val: ""
- string_val: ""
- string_val: ""
- string_val: ""
- string_val: ""
- string_val: ""
- string_val: ""
- string_val: ""
- }
- }
- }
- }
- node {
- name: "save/SaveV2"
- op: "SaveV2"
- input: "save/ShardedFilename"
- input: "save/SaveV2/tensor_names"
- input: "save/SaveV2/shape_and_slices"
- input: "dnn/hidden1/bias"
- input: "dnn/hidden1/weights"
- input: "dnn/hidden2/bias"
- input: "dnn/hidden2/weights"
- input: "dnn/hidden3/bias"
- input: "dnn/hidden3/weights"
- input: "dnn/outputs/bias"
- input: "dnn/outputs/weights"
- attr {
- key: "dtypes"
- value {
- list {
- type: DT_FLOAT
- type: DT_FLOAT
- type: DT_FLOAT
- type: DT_FLOAT
- type: DT_FLOAT
- type: DT_FLOAT
- type: DT_FLOAT
- type: DT_FLOAT
- }
- }
- }
- }
- node {
- name: "save/control_dependency"
- op: "Identity"
- input: "save/ShardedFilename"
- input: "^save/SaveV2"
- attr {
- key: "T"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@save/ShardedFilename"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- }
- node {
- name: "save/MergeV2Checkpoints/checkpoint_prefixes"
- op: "Pack"
- input: "save/ShardedFilename"
- input: "^save/control_dependency"
- attr {
- key: "N"
- value {
- i: 1
- }
- }
- attr {
- key: "T"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "axis"
- value {
- i: 0
- }
- }
- }
- node {
- name: "save/MergeV2Checkpoints"
- op: "MergeV2Checkpoints"
- input: "save/MergeV2Checkpoints/checkpoint_prefixes"
- input: "save/Const"
- attr {
- key: "delete_old_dirs"
- value {
- b: true
- }
- }
- }
- node {
- name: "save/Identity"
- op: "Identity"
- input: "save/Const"
- input: "^save/control_dependency"
- input: "^save/MergeV2Checkpoints"
- attr {
- key: "T"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- }
- }
- }
- }
- }
- node {
- name: "save/RestoreV2/tensor_names"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: "dnn/hidden1/bias"
- }
- }
- }
- }
- node {
- name: "save/RestoreV2/shape_and_slices"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: ""
- }
- }
- }
- }
- node {
- name: "save/RestoreV2"
- op: "RestoreV2"
- input: "save/Const"
- input: "save/RestoreV2/tensor_names"
- input: "save/RestoreV2/shape_and_slices"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "dtypes"
- value {
- list {
- type: DT_FLOAT
- }
- }
- }
- }
- node {
- name: "save/Assign"
- op: "Assign"
- input: "dnn/hidden1/bias"
- input: "save/RestoreV2"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden1/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "save/RestoreV2_1/tensor_names"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: "dnn/hidden1/weights"
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_1/shape_and_slices"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: ""
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_1"
- op: "RestoreV2"
- input: "save/Const"
- input: "save/RestoreV2_1/tensor_names"
- input: "save/RestoreV2_1/shape_and_slices"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "dtypes"
- value {
- list {
- type: DT_FLOAT
- }
- }
- }
- }
- node {
- name: "save/Assign_1"
- op: "Assign"
- input: "dnn/hidden1/weights"
- input: "save/RestoreV2_1"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden1/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 784
- }
- dim {
- size: 300
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "save/RestoreV2_2/tensor_names"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: "dnn/hidden2/bias"
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_2/shape_and_slices"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: ""
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_2"
- op: "RestoreV2"
- input: "save/Const"
- input: "save/RestoreV2_2/tensor_names"
- input: "save/RestoreV2_2/shape_and_slices"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "dtypes"
- value {
- list {
- type: DT_FLOAT
- }
- }
- }
- }
- node {
- name: "save/Assign_2"
- op: "Assign"
- input: "dnn/hidden2/bias"
- input: "save/RestoreV2_2"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden2/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "save/RestoreV2_3/tensor_names"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: "dnn/hidden2/weights"
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_3/shape_and_slices"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: ""
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_3"
- op: "RestoreV2"
- input: "save/Const"
- input: "save/RestoreV2_3/tensor_names"
- input: "save/RestoreV2_3/shape_and_slices"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "dtypes"
- value {
- list {
- type: DT_FLOAT
- }
- }
- }
- }
- node {
- name: "save/Assign_3"
- op: "Assign"
- input: "dnn/hidden2/weights"
- input: "save/RestoreV2_3"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden2/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 300
- }
- dim {
- size: 100
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "save/RestoreV2_4/tensor_names"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: "dnn/hidden3/bias"
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_4/shape_and_slices"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: ""
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_4"
- op: "RestoreV2"
- input: "save/Const"
- input: "save/RestoreV2_4/tensor_names"
- input: "save/RestoreV2_4/shape_and_slices"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "dtypes"
- value {
- list {
- type: DT_FLOAT
- }
- }
- }
- }
- node {
- name: "save/Assign_4"
- op: "Assign"
- input: "dnn/hidden3/bias"
- input: "save/RestoreV2_4"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden3/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "save/RestoreV2_5/tensor_names"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: "dnn/hidden3/weights"
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_5/shape_and_slices"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: ""
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_5"
- op: "RestoreV2"
- input: "save/Const"
- input: "save/RestoreV2_5/tensor_names"
- input: "save/RestoreV2_5/shape_and_slices"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "dtypes"
- value {
- list {
- type: DT_FLOAT
- }
- }
- }
- }
- node {
- name: "save/Assign_5"
- op: "Assign"
- input: "dnn/hidden3/weights"
- input: "save/RestoreV2_5"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/hidden3/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 100
- }
- dim {
- size: 40
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "save/RestoreV2_6/tensor_names"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: "dnn/outputs/bias"
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_6/shape_and_slices"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: ""
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_6"
- op: "RestoreV2"
- input: "save/Const"
- input: "save/RestoreV2_6/tensor_names"
- input: "save/RestoreV2_6/shape_and_slices"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "dtypes"
- value {
- list {
- type: DT_FLOAT
- }
- }
- }
- }
- node {
- name: "save/Assign_6"
- op: "Assign"
- input: "dnn/outputs/bias"
- input: "save/RestoreV2_6"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/outputs/bias"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "save/RestoreV2_7/tensor_names"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: "dnn/outputs/weights"
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_7/shape_and_slices"
- op: "Const"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 1
- }
- }
- }
- }
- }
- attr {
- key: "dtype"
- value {
- type: DT_STRING
- }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_STRING
- tensor_shape {
- dim {
- size: 1
- }
- }
- string_val: ""
- }
- }
- }
- }
- node {
- name: "save/RestoreV2_7"
- op: "RestoreV2"
- input: "save/Const"
- input: "save/RestoreV2_7/tensor_names"
- input: "save/RestoreV2_7/shape_and_slices"
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- unknown_rank: true
- }
- }
- }
- }
- attr {
- key: "dtypes"
- value {
- list {
- type: DT_FLOAT
- }
- }
- }
- }
- node {
- name: "save/Assign_7"
- op: "Assign"
- input: "dnn/outputs/weights"
- input: "save/RestoreV2_7"
- attr {
- key: "T"
- value {
- type: DT_FLOAT
- }
- }
- attr {
- key: "_class"
- value {
- list {
- s: "loc:@dnn/outputs/weights"
- }
- }
- }
- attr {
- key: "_output_shapes"
- value {
- list {
- shape {
- dim {
- size: 40
- }
- dim {
- size: 10
- }
- }
- }
- }
- }
- attr {
- key: "use_locking"
- value {
- b: true
- }
- }
- attr {
- key: "validate_shape"
- value {
- b: true
- }
- }
- }
- node {
- name: "save/restore_shard"
- op: "NoOp"
- input: "^save/Assign"
- input: "^save/Assign_1"
- input: "^save/Assign_2"
- input: "^save/Assign_3"
- input: "^save/Assign_4"
- input: "^save/Assign_5"
- input: "^save/Assign_6"
- input: "^save/Assign_7"
- }
- node {
- name: "save/restore_all"
- op: "NoOp"
- input: "^save/restore_shard"
- }
- versions {
- producer: 24
- }
- }
- saver_def {
- filename_tensor_name: "save/Const:0"
- save_tensor_name: "save/Identity:0"
- restore_op_name: "save/restore_all"
- max_to_keep: 5
- sharded: true
- keep_checkpoint_every_n_hours: 10000.0
- version: V2
- }
- collection_def {
- key: "summaries"
- value {
- node_list {
- value: "Accuracy:0"
- }
- }
- }
- collection_def {
- key: "train_op"
- value {
- node_list {
- value: "train/GradientDescent"
- }
- }
- }
- collection_def {
- key: "trainable_variables"
- value {
- bytes_list {
- value: "\n\025dnn/hidden1/weights:0\022\032dnn/hidden1/weights/Assign\032\032dnn/hidden1/weights/read:02\036dnn/hidden1/truncated_normal:0"
- value: "\n\022dnn/hidden1/bias:0\022\027dnn/hidden1/bias/Assign\032\027dnn/hidden1/bias/read:02\023dnn/hidden1/zeros:0"
- value: "\n\025dnn/hidden2/weights:0\022\032dnn/hidden2/weights/Assign\032\032dnn/hidden2/weights/read:02\036dnn/hidden2/truncated_normal:0"
- value: "\n\022dnn/hidden2/bias:0\022\027dnn/hidden2/bias/Assign\032\027dnn/hidden2/bias/read:02\023dnn/hidden2/zeros:0"
- value: "\n\025dnn/hidden3/weights:0\022\032dnn/hidden3/weights/Assign\032\032dnn/hidden3/weights/read:02\036dnn/hidden3/truncated_normal:0"
- value: "\n\022dnn/hidden3/bias:0\022\027dnn/hidden3/bias/Assign\032\027dnn/hidden3/bias/read:02\023dnn/hidden3/zeros:0"
- value: "\n\025dnn/outputs/weights:0\022\032dnn/outputs/weights/Assign\032\032dnn/outputs/weights/read:02\036dnn/outputs/truncated_normal:0"
- value: "\n\022dnn/outputs/bias:0\022\027dnn/outputs/bias/Assign\032\027dnn/outputs/bias/read:02\023dnn/outputs/zeros:0"
- }
- }
- }
- collection_def {
- key: "variables"
- value {
- bytes_list {
- value: "\n\025dnn/hidden1/weights:0\022\032dnn/hidden1/weights/Assign\032\032dnn/hidden1/weights/read:02\036dnn/hidden1/truncated_normal:0"
- value: "\n\022dnn/hidden1/bias:0\022\027dnn/hidden1/bias/Assign\032\027dnn/hidden1/bias/read:02\023dnn/hidden1/zeros:0"
- value: "\n\025dnn/hidden2/weights:0\022\032dnn/hidden2/weights/Assign\032\032dnn/hidden2/weights/read:02\036dnn/hidden2/truncated_normal:0"
- value: "\n\022dnn/hidden2/bias:0\022\027dnn/hidden2/bias/Assign\032\027dnn/hidden2/bias/read:02\023dnn/hidden2/zeros:0"
- value: "\n\025dnn/hidden3/weights:0\022\032dnn/hidden3/weights/Assign\032\032dnn/hidden3/weights/read:02\036dnn/hidden3/truncated_normal:0"
- value: "\n\022dnn/hidden3/bias:0\022\027dnn/hidden3/bias/Assign\032\027dnn/hidden3/bias/read:02\023dnn/hidden3/zeros:0"
- value: "\n\025dnn/outputs/weights:0\022\032dnn/outputs/weights/Assign\032\032dnn/outputs/weights/read:02\036dnn/outputs/truncated_normal:0"
- value: "\n\022dnn/outputs/bias:0\022\027dnn/outputs/bias/Assign\032\027dnn/outputs/bias/read:02\023dnn/outputs/zeros:0"
- }
- }
- }
- signature_def {
- key: "serving_default"
- value {
- inputs {
- key: "x"
- value {
- name: "X:0"
- dtype: DT_FLOAT
- tensor_shape {
- dim {
- size: -1
- }
- dim {
- size: 784
- }
- }
- }
- }
- outputs {
- key: "y"
- value {
- name: "dnn/outputs/add:0"
- dtype: DT_FLOAT
- tensor_shape {
- dim {
- size: -1
- }
- dim {
- size: 10
- }
- }
- }
- }
- method_name: "tensorflow/serving/predict"
- }
- }
-}
diff --git a/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/variables/variables.data-00000-of-00001 b/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/variables/variables.data-00000-of-00001
deleted file mode 100644
index e286d3bb9de..00000000000
--- a/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/variables/variables.data-00000-of-00001
+++ /dev/null
Binary files differ
diff --git a/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/variables/variables.index b/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/variables/variables.index
deleted file mode 100644
index 7643ec22a7d..00000000000
--- a/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/saved/variables/variables.index
+++ /dev/null
Binary files differ
diff --git a/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/mnist.py b/searchlib/src/test/files/integration/tensorflow/batch_norm/batch_normalization_mnist.py
index 090ab2a9b81..bc6ea13ebc1 100644
--- a/searchlib/src/test/files/integration/tensorflow/3_layer_mnist/mnist.py
+++ b/searchlib/src/test/files/integration/tensorflow/batch_norm/batch_normalization_mnist.py
@@ -1,8 +1,8 @@
+# Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-# Common imports
-import numpy as np
import tensorflow as tf
+from functools import partial
from tensorflow.examples.tutorials.mnist import input_data
from datetime import datetime
@@ -23,32 +23,29 @@ n_hidden3 = 40
n_outputs = 10
learning_rate = 0.01
-n_epochs = 40
-batch_size = 50
+n_epochs = 20
+batch_size = 200
+batch_norm_momentum = 0.9
X = tf.placeholder(tf.float32, shape=(None, n_inputs), name="X")
y = tf.placeholder(tf.int64, shape=(None), name="y")
+training = tf.placeholder_with_default(False, shape=(), name='training')
+def leaky_relu(z, name=None):
+ return tf.maximum(0.01 * z, z, name=name)
-def neuron_layer(X, n_neurons, name, activation=None):
- with tf.name_scope(name):
- n_inputs = int(X.get_shape()[1])
- stddev = 2 / np.sqrt(n_inputs)
- init = tf.truncated_normal((n_inputs, n_neurons), stddev=stddev)
- W = tf.Variable(init, name="weights")
- b = tf.Variable(tf.zeros([n_neurons]), name="bias")
- Z = tf.matmul(X, W) + b
- if activation is not None:
- return activation(Z)
- else:
- return Z
+with tf.name_scope("dnn"):
+ he_init = tf.contrib.layers.variance_scaling_initializer()
+ batch_norm_layer = partial(tf.layers.batch_normalization, training=training, momentum=batch_norm_momentum)
+ dense_layer = partial(tf.layers.dense, kernel_initializer=he_init)
-with tf.name_scope("dnn"):
- hidden1 = neuron_layer(X, n_hidden1, name="hidden1", activation=tf.nn.elu)
- hidden2 = neuron_layer(hidden1, n_hidden2, name="hidden2", activation=tf.nn.relu)
- hidden3 = neuron_layer(hidden2, n_hidden3, name="hidden3", activation=tf.nn.sigmoid)
- logits = neuron_layer(hidden3, n_outputs, name="outputs") #, activation=tf.nn.sigmoid)
+ hidden1 = dense_layer(X, n_hidden1, name="hidden1", activation=leaky_relu)
+ bn1 = tf.nn.elu(batch_norm_layer(hidden1))
+ hidden2 = dense_layer(bn1, n_hidden2, name="hidden2", activation=tf.nn.elu)
+ bn2 = tf.nn.elu(batch_norm_layer(hidden2))
+ logits_before_bn = dense_layer(bn2, n_outputs, name="outputs", activation=tf.nn.selu)
+ logits = batch_norm_layer(logits_before_bn)
with tf.name_scope("loss"):
xentropy = tf.nn.sparse_softmax_cross_entropy_with_logits(labels=y, logits=logits)
@@ -65,21 +62,23 @@ with tf.name_scope("eval"):
init = tf.global_variables_initializer()
accuracy_summary = tf.summary.scalar('Accuracy', accuracy)
file_writer = tf.summary.FileWriter(logdir, tf.get_default_graph())
+extra_update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
with tf.Session() as sess:
init.run()
for epoch in range(n_epochs):
for iteration in range(mnist.train.num_examples // batch_size):
X_batch, y_batch = mnist.train.next_batch(batch_size)
- sess.run(training_op, feed_dict={X: X_batch, y: y_batch})
- acc_train = accuracy.eval(feed_dict={X: X_batch, y: y_batch})
- acc_val = accuracy.eval(feed_dict={X: mnist.validation.images,
- y: mnist.validation.labels})
- print(epoch, "Train accuracy:", acc_train, "Val accuracy:", acc_val)
+ sess.run([training_op, extra_update_ops],
+ feed_dict={training: True, X: X_batch, y: y_batch})
+
+ accuracy_val = accuracy.eval(feed_dict={X: mnist.test.images,
+ y: mnist.test.labels})
+ print(epoch, "Test accuracy:", accuracy_val)
# Save summary for tensorboard
summary_str = accuracy_summary.eval(feed_dict={X: mnist.validation.images,
- y: mnist.validation.labels})
+ y: mnist.validation.labels})
file_writer.add_summary(summary_str, epoch)
export_path = "saved"
@@ -93,3 +92,4 @@ with tf.Session() as sess:
file_writer.close()
+
diff --git a/searchlib/src/test/files/integration/tensorflow/batch_norm/saved/saved_model.pbtxt b/searchlib/src/test/files/integration/tensorflow/batch_norm/saved/saved_model.pbtxt
new file mode 100644
index 00000000000..f3ce68a1cbd
--- /dev/null
+++ b/searchlib/src/test/files/integration/tensorflow/batch_norm/saved/saved_model.pbtxt
@@ -0,0 +1,32648 @@
+saved_model_schema_version: 1
+meta_graphs {
+ meta_info_def {
+ stripped_op_list {
+ op {
+ name: "Add"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_UINT8
+ type: DT_INT8
+ type: DT_INT16
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ type: DT_STRING
+ }
+ }
+ }
+ }
+ op {
+ name: "AddN"
+ input_arg {
+ name: "inputs"
+ type_attr: "T"
+ number_attr: "N"
+ }
+ output_arg {
+ name: "sum"
+ type_attr: "T"
+ }
+ attr {
+ name: "N"
+ type: "int"
+ has_minimum: true
+ minimum: 1
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT64
+ type: DT_INT32
+ type: DT_UINT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ type: DT_QINT8
+ type: DT_QUINT8
+ type: DT_QINT32
+ type: DT_HALF
+ type: DT_VARIANT
+ }
+ }
+ }
+ is_aggregate: true
+ is_commutative: true
+ }
+ op {
+ name: "ApplyGradientDescent"
+ input_arg {
+ name: "var"
+ type_attr: "T"
+ is_ref: true
+ }
+ input_arg {
+ name: "alpha"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "delta"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "out"
+ type_attr: "T"
+ is_ref: true
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT64
+ type: DT_INT32
+ type: DT_UINT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ type: DT_QINT8
+ type: DT_QUINT8
+ type: DT_QINT32
+ type: DT_HALF
+ }
+ }
+ }
+ attr {
+ name: "use_locking"
+ type: "bool"
+ default_value {
+ b: false
+ }
+ }
+ }
+ op {
+ name: "Assign"
+ input_arg {
+ name: "ref"
+ type_attr: "T"
+ is_ref: true
+ }
+ input_arg {
+ name: "value"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output_ref"
+ type_attr: "T"
+ is_ref: true
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ attr {
+ name: "validate_shape"
+ type: "bool"
+ default_value {
+ b: true
+ }
+ }
+ attr {
+ name: "use_locking"
+ type: "bool"
+ default_value {
+ b: true
+ }
+ }
+ allows_uninitialized_input: true
+ }
+ op {
+ name: "AssignSub"
+ input_arg {
+ name: "ref"
+ type_attr: "T"
+ is_ref: true
+ }
+ input_arg {
+ name: "value"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output_ref"
+ type_attr: "T"
+ is_ref: true
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT64
+ type: DT_INT32
+ type: DT_UINT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ type: DT_QINT8
+ type: DT_QUINT8
+ type: DT_QINT32
+ type: DT_HALF
+ }
+ }
+ }
+ attr {
+ name: "use_locking"
+ type: "bool"
+ default_value {
+ b: false
+ }
+ }
+ }
+ op {
+ name: "BiasAdd"
+ input_arg {
+ name: "value"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "bias"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT64
+ type: DT_INT32
+ type: DT_UINT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ type: DT_QINT8
+ type: DT_QUINT8
+ type: DT_QINT32
+ type: DT_HALF
+ }
+ }
+ }
+ attr {
+ name: "data_format"
+ type: "string"
+ default_value {
+ s: "NHWC"
+ }
+ allowed_values {
+ list {
+ s: "NHWC"
+ s: "NCHW"
+ }
+ }
+ }
+ }
+ op {
+ name: "BiasAddGrad"
+ input_arg {
+ name: "out_backprop"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT64
+ type: DT_INT32
+ type: DT_UINT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ type: DT_QINT8
+ type: DT_QUINT8
+ type: DT_QINT32
+ type: DT_HALF
+ }
+ }
+ }
+ attr {
+ name: "data_format"
+ type: "string"
+ default_value {
+ s: "NHWC"
+ }
+ allowed_values {
+ list {
+ s: "NHWC"
+ s: "NCHW"
+ }
+ }
+ }
+ }
+ op {
+ name: "BroadcastGradientArgs"
+ input_arg {
+ name: "s0"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "s1"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "r0"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "r1"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "Cast"
+ input_arg {
+ name: "x"
+ type_attr: "SrcT"
+ }
+ output_arg {
+ name: "y"
+ type_attr: "DstT"
+ }
+ attr {
+ name: "SrcT"
+ type: "type"
+ }
+ attr {
+ name: "DstT"
+ type: "type"
+ }
+ }
+ op {
+ name: "Const"
+ output_arg {
+ name: "output"
+ type_attr: "dtype"
+ }
+ attr {
+ name: "value"
+ type: "tensor"
+ }
+ attr {
+ name: "dtype"
+ type: "type"
+ }
+ }
+ op {
+ name: "DynamicStitch"
+ input_arg {
+ name: "indices"
+ type: DT_INT32
+ number_attr: "N"
+ }
+ input_arg {
+ name: "data"
+ type_attr: "T"
+ number_attr: "N"
+ }
+ output_arg {
+ name: "merged"
+ type_attr: "T"
+ }
+ attr {
+ name: "N"
+ type: "int"
+ has_minimum: true
+ minimum: 1
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ }
+ op {
+ name: "Elu"
+ input_arg {
+ name: "features"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "activations"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ }
+ }
+ }
+ }
+ op {
+ name: "EluGrad"
+ input_arg {
+ name: "gradients"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "outputs"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "backprops"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ }
+ }
+ }
+ }
+ op {
+ name: "ExpandDims"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "dim"
+ type_attr: "Tdim"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ attr {
+ name: "Tdim"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "Fill"
+ input_arg {
+ name: "dims"
+ type: DT_INT32
+ }
+ input_arg {
+ name: "value"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ }
+ op {
+ name: "FloorDiv"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_UINT8
+ type: DT_INT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ }
+ }
+ }
+ }
+ op {
+ name: "FloorMod"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ }
+ }
+ }
+ }
+ op {
+ name: "GreaterEqual"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type: DT_BOOL
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_UINT8
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_UINT16
+ type: DT_HALF
+ }
+ }
+ }
+ }
+ op {
+ name: "Identity"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ }
+ op {
+ name: "InTopKV2"
+ input_arg {
+ name: "predictions"
+ type: DT_FLOAT
+ }
+ input_arg {
+ name: "targets"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "k"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "precision"
+ type: DT_BOOL
+ }
+ attr {
+ name: "T"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "MatMul"
+ input_arg {
+ name: "a"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "b"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "product"
+ type_attr: "T"
+ }
+ attr {
+ name: "transpose_a"
+ type: "bool"
+ default_value {
+ b: false
+ }
+ }
+ attr {
+ name: "transpose_b"
+ type: "bool"
+ default_value {
+ b: false
+ }
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT32
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ }
+ }
+ }
+ }
+ op {
+ name: "Maximum"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ is_commutative: true
+ }
+ op {
+ name: "Mean"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "reduction_indices"
+ type_attr: "Tidx"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "keep_dims"
+ type: "bool"
+ default_value {
+ b: false
+ }
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT64
+ type: DT_INT32
+ type: DT_UINT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ type: DT_QINT8
+ type: DT_QUINT8
+ type: DT_QINT32
+ type: DT_HALF
+ }
+ }
+ }
+ attr {
+ name: "Tidx"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "MergeV2Checkpoints"
+ input_arg {
+ name: "checkpoint_prefixes"
+ type: DT_STRING
+ }
+ input_arg {
+ name: "destination_prefix"
+ type: DT_STRING
+ }
+ attr {
+ name: "delete_old_dirs"
+ type: "bool"
+ default_value {
+ b: true
+ }
+ }
+ is_stateful: true
+ }
+ op {
+ name: "Mul"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_UINT8
+ type: DT_INT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ }
+ }
+ }
+ is_commutative: true
+ }
+ op {
+ name: "Neg"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ }
+ }
+ }
+ }
+ op {
+ name: "NoOp"
+ }
+ op {
+ name: "Pack"
+ input_arg {
+ name: "values"
+ type_attr: "T"
+ number_attr: "N"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "N"
+ type: "int"
+ has_minimum: true
+ minimum: 1
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ attr {
+ name: "axis"
+ type: "int"
+ default_value {
+ i: 0
+ }
+ }
+ }
+ op {
+ name: "Placeholder"
+ output_arg {
+ name: "output"
+ type_attr: "dtype"
+ }
+ attr {
+ name: "dtype"
+ type: "type"
+ }
+ attr {
+ name: "shape"
+ type: "shape"
+ default_value {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ op {
+ name: "PlaceholderWithDefault"
+ input_arg {
+ name: "input"
+ type_attr: "dtype"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "dtype"
+ }
+ attr {
+ name: "dtype"
+ type: "type"
+ }
+ attr {
+ name: "shape"
+ type: "shape"
+ }
+ }
+ op {
+ name: "PreventGradient"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ attr {
+ name: "message"
+ type: "string"
+ default_value {
+ s: ""
+ }
+ }
+ }
+ op {
+ name: "Prod"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "reduction_indices"
+ type_attr: "Tidx"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "keep_dims"
+ type: "bool"
+ default_value {
+ b: false
+ }
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT64
+ type: DT_INT32
+ type: DT_UINT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ type: DT_QINT8
+ type: DT_QUINT8
+ type: DT_QINT32
+ type: DT_HALF
+ }
+ }
+ }
+ attr {
+ name: "Tidx"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "Range"
+ input_arg {
+ name: "start"
+ type_attr: "Tidx"
+ }
+ input_arg {
+ name: "limit"
+ type_attr: "Tidx"
+ }
+ input_arg {
+ name: "delta"
+ type_attr: "Tidx"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "Tidx"
+ }
+ attr {
+ name: "Tidx"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "RealDiv"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_UINT8
+ type: DT_INT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ }
+ }
+ }
+ }
+ op {
+ name: "Reshape"
+ input_arg {
+ name: "tensor"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "shape"
+ type_attr: "Tshape"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ attr {
+ name: "Tshape"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "RestoreV2"
+ input_arg {
+ name: "prefix"
+ type: DT_STRING
+ }
+ input_arg {
+ name: "tensor_names"
+ type: DT_STRING
+ }
+ input_arg {
+ name: "shape_and_slices"
+ type: DT_STRING
+ }
+ output_arg {
+ name: "tensors"
+ type_list_attr: "dtypes"
+ }
+ attr {
+ name: "dtypes"
+ type: "list(type)"
+ has_minimum: true
+ minimum: 1
+ }
+ is_stateful: true
+ }
+ op {
+ name: "Rsqrt"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ }
+ }
+ }
+ }
+ op {
+ name: "RsqrtGrad"
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "dy"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ }
+ }
+ }
+ }
+ op {
+ name: "SaveV2"
+ input_arg {
+ name: "prefix"
+ type: DT_STRING
+ }
+ input_arg {
+ name: "tensor_names"
+ type: DT_STRING
+ }
+ input_arg {
+ name: "shape_and_slices"
+ type: DT_STRING
+ }
+ input_arg {
+ name: "tensors"
+ type_list_attr: "dtypes"
+ }
+ attr {
+ name: "dtypes"
+ type: "list(type)"
+ has_minimum: true
+ minimum: 1
+ }
+ is_stateful: true
+ }
+ op {
+ name: "ScalarSummary"
+ input_arg {
+ name: "tags"
+ type: DT_STRING
+ }
+ input_arg {
+ name: "values"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "summary"
+ type: DT_STRING
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_UINT8
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_UINT16
+ type: DT_HALF
+ }
+ }
+ }
+ }
+ op {
+ name: "Select"
+ input_arg {
+ name: "condition"
+ type: DT_BOOL
+ }
+ input_arg {
+ name: "t"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "e"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ }
+ op {
+ name: "Selu"
+ input_arg {
+ name: "features"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "activations"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ }
+ }
+ }
+ }
+ op {
+ name: "SeluGrad"
+ input_arg {
+ name: "gradients"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "outputs"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "backprops"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ }
+ }
+ }
+ }
+ op {
+ name: "Shape"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "out_type"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ attr {
+ name: "out_type"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "ShardedFilename"
+ input_arg {
+ name: "basename"
+ type: DT_STRING
+ }
+ input_arg {
+ name: "shard"
+ type: DT_INT32
+ }
+ input_arg {
+ name: "num_shards"
+ type: DT_INT32
+ }
+ output_arg {
+ name: "filename"
+ type: DT_STRING
+ }
+ }
+ op {
+ name: "SparseSoftmaxCrossEntropyWithLogits"
+ input_arg {
+ name: "features"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "labels"
+ type_attr: "Tlabels"
+ }
+ output_arg {
+ name: "loss"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "backprop"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ }
+ }
+ }
+ attr {
+ name: "Tlabels"
+ type: "type"
+ default_value {
+ type: DT_INT64
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "SquaredDifference"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ }
+ }
+ }
+ is_commutative: true
+ }
+ op {
+ name: "Squeeze"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ attr {
+ name: "squeeze_dims"
+ type: "list(int)"
+ default_value {
+ list {
+ }
+ }
+ has_minimum: true
+ }
+ }
+ op {
+ name: "StopGradient"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ }
+ op {
+ name: "StringJoin"
+ input_arg {
+ name: "inputs"
+ type: DT_STRING
+ number_attr: "N"
+ }
+ output_arg {
+ name: "output"
+ type: DT_STRING
+ }
+ attr {
+ name: "N"
+ type: "int"
+ has_minimum: true
+ minimum: 1
+ }
+ attr {
+ name: "separator"
+ type: "string"
+ default_value {
+ s: ""
+ }
+ }
+ }
+ op {
+ name: "Sub"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "z"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_UINT8
+ type: DT_INT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT32
+ type: DT_INT64
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ }
+ }
+ }
+ }
+ op {
+ name: "Sum"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "reduction_indices"
+ type_attr: "Tidx"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "keep_dims"
+ type: "bool"
+ default_value {
+ b: false
+ }
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ type: DT_INT64
+ type: DT_INT32
+ type: DT_UINT8
+ type: DT_UINT16
+ type: DT_INT16
+ type: DT_INT8
+ type: DT_COMPLEX64
+ type: DT_COMPLEX128
+ type: DT_QINT8
+ type: DT_QUINT8
+ type: DT_QINT32
+ type: DT_HALF
+ }
+ }
+ }
+ attr {
+ name: "Tidx"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "Tile"
+ input_arg {
+ name: "input"
+ type_attr: "T"
+ }
+ input_arg {
+ name: "multiples"
+ type_attr: "Tmultiples"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ attr {
+ name: "Tmultiples"
+ type: "type"
+ default_value {
+ type: DT_INT32
+ }
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ }
+ op {
+ name: "TruncatedNormal"
+ input_arg {
+ name: "shape"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "output"
+ type_attr: "dtype"
+ }
+ attr {
+ name: "seed"
+ type: "int"
+ default_value {
+ i: 0
+ }
+ }
+ attr {
+ name: "seed2"
+ type: "int"
+ default_value {
+ i: 0
+ }
+ }
+ attr {
+ name: "dtype"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_HALF
+ type: DT_FLOAT
+ type: DT_DOUBLE
+ }
+ }
+ }
+ attr {
+ name: "T"
+ type: "type"
+ allowed_values {
+ list {
+ type: DT_INT32
+ type: DT_INT64
+ }
+ }
+ }
+ is_stateful: true
+ }
+ op {
+ name: "VariableV2"
+ output_arg {
+ name: "ref"
+ type_attr: "dtype"
+ is_ref: true
+ }
+ attr {
+ name: "shape"
+ type: "shape"
+ }
+ attr {
+ name: "dtype"
+ type: "type"
+ }
+ attr {
+ name: "container"
+ type: "string"
+ default_value {
+ s: ""
+ }
+ }
+ attr {
+ name: "shared_name"
+ type: "string"
+ default_value {
+ s: ""
+ }
+ }
+ is_stateful: true
+ }
+ op {
+ name: "ZerosLike"
+ input_arg {
+ name: "x"
+ type_attr: "T"
+ }
+ output_arg {
+ name: "y"
+ type_attr: "T"
+ }
+ attr {
+ name: "T"
+ type: "type"
+ }
+ }
+ }
+ tags: "serve"
+ tensorflow_version: "1.4.1"
+ tensorflow_git_version: "v1.4.0-19-ga52c8d9"
+ }
+ graph_def {
+ node {
+ name: "X"
+ op: "Placeholder"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 784
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 784
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "y"
+ op: "Placeholder"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT64
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ node {
+ name: "training/input"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_BOOL
+ tensor_shape {
+ }
+ bool_val: false
+ }
+ }
+ }
+ }
+ node {
+ name: "training"
+ op: "PlaceholderWithDefault"
+ input: "training/input"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden1/kernel/Initializer/truncated_normal/shape"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\020\003\000\000,\001\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden1/kernel/Initializer/truncated_normal/mean"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden1/kernel/Initializer/truncated_normal/stddev"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.057587556540966034
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden1/kernel/Initializer/truncated_normal/TruncatedNormal"
+ op: "TruncatedNormal"
+ input: "hidden1/kernel/Initializer/truncated_normal/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "seed"
+ value {
+ i: 0
+ }
+ }
+ attr {
+ key: "seed2"
+ value {
+ i: 0
+ }
+ }
+ }
+ node {
+ name: "hidden1/kernel/Initializer/truncated_normal/mul"
+ op: "Mul"
+ input: "hidden1/kernel/Initializer/truncated_normal/TruncatedNormal"
+ input: "hidden1/kernel/Initializer/truncated_normal/stddev"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden1/kernel/Initializer/truncated_normal"
+ op: "Add"
+ input: "hidden1/kernel/Initializer/truncated_normal/mul"
+ input: "hidden1/kernel/Initializer/truncated_normal/mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden1/kernel"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "hidden1/kernel/Assign"
+ op: "Assign"
+ input: "hidden1/kernel"
+ input: "hidden1/kernel/Initializer/truncated_normal"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "hidden1/kernel/read"
+ op: "Identity"
+ input: "hidden1/kernel"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden1/bias/Initializer/zeros"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 300
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden1/bias"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "hidden1/bias/Assign"
+ op: "Assign"
+ input: "hidden1/bias"
+ input: "hidden1/bias/Initializer/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "hidden1/bias/read"
+ op: "Identity"
+ input: "hidden1/bias"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/hidden1/MatMul"
+ op: "MatMul"
+ input: "X"
+ input: "hidden1/kernel/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "transpose_a"
+ value {
+ b: false
+ }
+ }
+ attr {
+ key: "transpose_b"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "dnn/hidden1/BiasAdd"
+ op: "BiasAdd"
+ input: "dnn/hidden1/MatMul"
+ input: "hidden1/bias/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "data_format"
+ value {
+ s: "NHWC"
+ }
+ }
+ }
+ node {
+ name: "dnn/hidden1/mul/x"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.009999999776482582
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/hidden1/mul"
+ op: "Mul"
+ input: "dnn/hidden1/mul/x"
+ input: "dnn/hidden1/BiasAdd"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/hidden1/Maximum"
+ op: "Maximum"
+ input: "dnn/hidden1/mul"
+ input: "dnn/hidden1/BiasAdd"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/gamma/Initializer/ones"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 300
+ }
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/gamma"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/gamma/Assign"
+ op: "Assign"
+ input: "batch_normalization/gamma"
+ input: "batch_normalization/gamma/Initializer/ones"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/gamma/read"
+ op: "Identity"
+ input: "batch_normalization/gamma"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/beta/Initializer/zeros"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 300
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/beta"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/beta/Assign"
+ op: "Assign"
+ input: "batch_normalization/beta"
+ input: "batch_normalization/beta/Initializer/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/beta/read"
+ op: "Identity"
+ input: "batch_normalization/beta"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/moving_mean/Initializer/zeros"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 300
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/moving_mean"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/moving_mean/Assign"
+ op: "Assign"
+ input: "batch_normalization/moving_mean"
+ input: "batch_normalization/moving_mean/Initializer/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/moving_mean/read"
+ op: "Identity"
+ input: "batch_normalization/moving_mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/moving_variance/Initializer/ones"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 300
+ }
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/moving_variance"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/moving_variance/Assign"
+ op: "Assign"
+ input: "batch_normalization/moving_variance"
+ input: "batch_normalization/moving_variance/Initializer/ones"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization/moving_variance/read"
+ op: "Identity"
+ input: "batch_normalization/moving_variance"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/moments/mean/reduction_indices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/moments/mean"
+ op: "Mean"
+ input: "dnn/hidden1/Maximum"
+ input: "dnn/batch_normalization/moments/mean/reduction_indices"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/moments/StopGradient"
+ op: "StopGradient"
+ input: "dnn/batch_normalization/moments/mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/moments/SquaredDifference"
+ op: "SquaredDifference"
+ input: "dnn/hidden1/Maximum"
+ input: "dnn/batch_normalization/moments/StopGradient"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/moments/variance/reduction_indices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/moments/variance"
+ op: "Mean"
+ input: "dnn/batch_normalization/moments/SquaredDifference"
+ input: "dnn/batch_normalization/moments/variance/reduction_indices"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/moments/Squeeze"
+ op: "Squeeze"
+ input: "dnn/batch_normalization/moments/mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/moments/Squeeze_1"
+ op: "Squeeze"
+ input: "dnn/batch_normalization/moments/variance"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization/moments/Squeeze"
+ input: "dnn/batch_normalization/ExpandDims/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_1/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_1"
+ op: "ExpandDims"
+ input: "batch_normalization/moving_mean/read"
+ input: "dnn/batch_normalization/ExpandDims_1/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Reshape/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Reshape"
+ op: "Reshape"
+ input: "training"
+ input: "dnn/batch_normalization/Reshape/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Select"
+ op: "Select"
+ input: "dnn/batch_normalization/Reshape"
+ input: "dnn/batch_normalization/ExpandDims"
+ input: "dnn/batch_normalization/ExpandDims_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Squeeze"
+ op: "Squeeze"
+ input: "dnn/batch_normalization/Select"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_2/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_2"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization/moments/Squeeze_1"
+ input: "dnn/batch_normalization/ExpandDims_2/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_3/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_3"
+ op: "ExpandDims"
+ input: "batch_normalization/moving_variance/read"
+ input: "dnn/batch_normalization/ExpandDims_3/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Reshape_1/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Reshape_1"
+ op: "Reshape"
+ input: "training"
+ input: "dnn/batch_normalization/Reshape_1/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Select_1"
+ op: "Select"
+ input: "dnn/batch_normalization/Reshape_1"
+ input: "dnn/batch_normalization/ExpandDims_2"
+ input: "dnn/batch_normalization/ExpandDims_3"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Squeeze_1"
+ op: "Squeeze"
+ input: "dnn/batch_normalization/Select_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_4/input"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.8999999761581421
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_4/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_4"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization/ExpandDims_4/input"
+ input: "dnn/batch_normalization/ExpandDims_4/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_5/input"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_5/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/ExpandDims_5"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization/ExpandDims_5/input"
+ input: "dnn/batch_normalization/ExpandDims_5/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Reshape_2/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Reshape_2"
+ op: "Reshape"
+ input: "training"
+ input: "dnn/batch_normalization/Reshape_2/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Select_2"
+ op: "Select"
+ input: "dnn/batch_normalization/Reshape_2"
+ input: "dnn/batch_normalization/ExpandDims_4"
+ input: "dnn/batch_normalization/ExpandDims_5"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/Squeeze_2"
+ op: "Squeeze"
+ input: "dnn/batch_normalization/Select_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg/sub/x"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg/sub"
+ op: "Sub"
+ input: "dnn/batch_normalization/AssignMovingAvg/sub/x"
+ input: "dnn/batch_normalization/Squeeze_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg/sub_1"
+ op: "Sub"
+ input: "batch_normalization/moving_mean/read"
+ input: "dnn/batch_normalization/Squeeze"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg/mul"
+ op: "Mul"
+ input: "dnn/batch_normalization/AssignMovingAvg/sub_1"
+ input: "dnn/batch_normalization/AssignMovingAvg/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg"
+ op: "AssignSub"
+ input: "batch_normalization/moving_mean"
+ input: "dnn/batch_normalization/AssignMovingAvg/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg_1/sub/x"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg_1/sub"
+ op: "Sub"
+ input: "dnn/batch_normalization/AssignMovingAvg_1/sub/x"
+ input: "dnn/batch_normalization/Squeeze_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg_1/sub_1"
+ op: "Sub"
+ input: "batch_normalization/moving_variance/read"
+ input: "dnn/batch_normalization/Squeeze_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg_1/mul"
+ op: "Mul"
+ input: "dnn/batch_normalization/AssignMovingAvg_1/sub_1"
+ input: "dnn/batch_normalization/AssignMovingAvg_1/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/AssignMovingAvg_1"
+ op: "AssignSub"
+ input: "batch_normalization/moving_variance"
+ input: "dnn/batch_normalization/AssignMovingAvg_1/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/batchnorm/add/y"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.0010000000474974513
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/batchnorm/add"
+ op: "Add"
+ input: "dnn/batch_normalization/Squeeze_1"
+ input: "dnn/batch_normalization/batchnorm/add/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/batchnorm/Rsqrt"
+ op: "Rsqrt"
+ input: "dnn/batch_normalization/batchnorm/add"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/batchnorm/mul"
+ op: "Mul"
+ input: "dnn/batch_normalization/batchnorm/Rsqrt"
+ input: "batch_normalization/gamma/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/batchnorm/mul_1"
+ op: "Mul"
+ input: "dnn/hidden1/Maximum"
+ input: "dnn/batch_normalization/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/batchnorm/mul_2"
+ op: "Mul"
+ input: "dnn/batch_normalization/Squeeze"
+ input: "dnn/batch_normalization/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/batchnorm/sub"
+ op: "Sub"
+ input: "batch_normalization/beta/read"
+ input: "dnn/batch_normalization/batchnorm/mul_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization/batchnorm/add_1"
+ op: "Add"
+ input: "dnn/batch_normalization/batchnorm/mul_1"
+ input: "dnn/batch_normalization/batchnorm/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/Elu"
+ op: "Elu"
+ input: "dnn/batch_normalization/batchnorm/add_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden2/kernel/Initializer/truncated_normal/shape"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: ",\001\000\000d\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden2/kernel/Initializer/truncated_normal/mean"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden2/kernel/Initializer/truncated_normal/stddev"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.09309493005275726
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden2/kernel/Initializer/truncated_normal/TruncatedNormal"
+ op: "TruncatedNormal"
+ input: "hidden2/kernel/Initializer/truncated_normal/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "seed"
+ value {
+ i: 0
+ }
+ }
+ attr {
+ key: "seed2"
+ value {
+ i: 0
+ }
+ }
+ }
+ node {
+ name: "hidden2/kernel/Initializer/truncated_normal/mul"
+ op: "Mul"
+ input: "hidden2/kernel/Initializer/truncated_normal/TruncatedNormal"
+ input: "hidden2/kernel/Initializer/truncated_normal/stddev"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden2/kernel/Initializer/truncated_normal"
+ op: "Add"
+ input: "hidden2/kernel/Initializer/truncated_normal/mul"
+ input: "hidden2/kernel/Initializer/truncated_normal/mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden2/kernel"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "hidden2/kernel/Assign"
+ op: "Assign"
+ input: "hidden2/kernel"
+ input: "hidden2/kernel/Initializer/truncated_normal"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "hidden2/kernel/read"
+ op: "Identity"
+ input: "hidden2/kernel"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden2/bias/Initializer/zeros"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 100
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "hidden2/bias"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "hidden2/bias/Assign"
+ op: "Assign"
+ input: "hidden2/bias"
+ input: "hidden2/bias/Initializer/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "hidden2/bias/read"
+ op: "Identity"
+ input: "hidden2/bias"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/hidden2/MatMul"
+ op: "MatMul"
+ input: "dnn/Elu"
+ input: "hidden2/kernel/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "transpose_a"
+ value {
+ b: false
+ }
+ }
+ attr {
+ key: "transpose_b"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "dnn/hidden2/BiasAdd"
+ op: "BiasAdd"
+ input: "dnn/hidden2/MatMul"
+ input: "hidden2/bias/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "data_format"
+ value {
+ s: "NHWC"
+ }
+ }
+ }
+ node {
+ name: "dnn/hidden2/Elu"
+ op: "Elu"
+ input: "dnn/hidden2/BiasAdd"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/gamma/Initializer/ones"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 100
+ }
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/gamma"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/gamma/Assign"
+ op: "Assign"
+ input: "batch_normalization_1/gamma"
+ input: "batch_normalization_1/gamma/Initializer/ones"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/gamma/read"
+ op: "Identity"
+ input: "batch_normalization_1/gamma"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/beta/Initializer/zeros"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 100
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/beta"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/beta/Assign"
+ op: "Assign"
+ input: "batch_normalization_1/beta"
+ input: "batch_normalization_1/beta/Initializer/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/beta/read"
+ op: "Identity"
+ input: "batch_normalization_1/beta"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/moving_mean/Initializer/zeros"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 100
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/moving_mean"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/moving_mean/Assign"
+ op: "Assign"
+ input: "batch_normalization_1/moving_mean"
+ input: "batch_normalization_1/moving_mean/Initializer/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/moving_mean/read"
+ op: "Identity"
+ input: "batch_normalization_1/moving_mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/moving_variance/Initializer/ones"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 100
+ }
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/moving_variance"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/moving_variance/Assign"
+ op: "Assign"
+ input: "batch_normalization_1/moving_variance"
+ input: "batch_normalization_1/moving_variance/Initializer/ones"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_1/moving_variance/read"
+ op: "Identity"
+ input: "batch_normalization_1/moving_variance"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/moments/mean/reduction_indices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/moments/mean"
+ op: "Mean"
+ input: "dnn/hidden2/Elu"
+ input: "dnn/batch_normalization_2/moments/mean/reduction_indices"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/moments/StopGradient"
+ op: "StopGradient"
+ input: "dnn/batch_normalization_2/moments/mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/moments/SquaredDifference"
+ op: "SquaredDifference"
+ input: "dnn/hidden2/Elu"
+ input: "dnn/batch_normalization_2/moments/StopGradient"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/moments/variance/reduction_indices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/moments/variance"
+ op: "Mean"
+ input: "dnn/batch_normalization_2/moments/SquaredDifference"
+ input: "dnn/batch_normalization_2/moments/variance/reduction_indices"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/moments/Squeeze"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_2/moments/mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/moments/Squeeze_1"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_2/moments/variance"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization_2/moments/Squeeze"
+ input: "dnn/batch_normalization_2/ExpandDims/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_1/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_1"
+ op: "ExpandDims"
+ input: "batch_normalization_1/moving_mean/read"
+ input: "dnn/batch_normalization_2/ExpandDims_1/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Reshape/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Reshape"
+ op: "Reshape"
+ input: "training"
+ input: "dnn/batch_normalization_2/Reshape/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Select"
+ op: "Select"
+ input: "dnn/batch_normalization_2/Reshape"
+ input: "dnn/batch_normalization_2/ExpandDims"
+ input: "dnn/batch_normalization_2/ExpandDims_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Squeeze"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_2/Select"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_2/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_2"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization_2/moments/Squeeze_1"
+ input: "dnn/batch_normalization_2/ExpandDims_2/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_3/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_3"
+ op: "ExpandDims"
+ input: "batch_normalization_1/moving_variance/read"
+ input: "dnn/batch_normalization_2/ExpandDims_3/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Reshape_1/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Reshape_1"
+ op: "Reshape"
+ input: "training"
+ input: "dnn/batch_normalization_2/Reshape_1/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Select_1"
+ op: "Select"
+ input: "dnn/batch_normalization_2/Reshape_1"
+ input: "dnn/batch_normalization_2/ExpandDims_2"
+ input: "dnn/batch_normalization_2/ExpandDims_3"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Squeeze_1"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_2/Select_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_4/input"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.8999999761581421
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_4/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_4"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization_2/ExpandDims_4/input"
+ input: "dnn/batch_normalization_2/ExpandDims_4/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_5/input"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_5/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/ExpandDims_5"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization_2/ExpandDims_5/input"
+ input: "dnn/batch_normalization_2/ExpandDims_5/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Reshape_2/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Reshape_2"
+ op: "Reshape"
+ input: "training"
+ input: "dnn/batch_normalization_2/Reshape_2/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Select_2"
+ op: "Select"
+ input: "dnn/batch_normalization_2/Reshape_2"
+ input: "dnn/batch_normalization_2/ExpandDims_4"
+ input: "dnn/batch_normalization_2/ExpandDims_5"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/Squeeze_2"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_2/Select_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg/sub/x"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg/sub"
+ op: "Sub"
+ input: "dnn/batch_normalization_2/AssignMovingAvg/sub/x"
+ input: "dnn/batch_normalization_2/Squeeze_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg/sub_1"
+ op: "Sub"
+ input: "batch_normalization_1/moving_mean/read"
+ input: "dnn/batch_normalization_2/Squeeze"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg/mul"
+ op: "Mul"
+ input: "dnn/batch_normalization_2/AssignMovingAvg/sub_1"
+ input: "dnn/batch_normalization_2/AssignMovingAvg/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg"
+ op: "AssignSub"
+ input: "batch_normalization_1/moving_mean"
+ input: "dnn/batch_normalization_2/AssignMovingAvg/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg_1/sub/x"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg_1/sub"
+ op: "Sub"
+ input: "dnn/batch_normalization_2/AssignMovingAvg_1/sub/x"
+ input: "dnn/batch_normalization_2/Squeeze_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg_1/sub_1"
+ op: "Sub"
+ input: "batch_normalization_1/moving_variance/read"
+ input: "dnn/batch_normalization_2/Squeeze_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg_1/mul"
+ op: "Mul"
+ input: "dnn/batch_normalization_2/AssignMovingAvg_1/sub_1"
+ input: "dnn/batch_normalization_2/AssignMovingAvg_1/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/AssignMovingAvg_1"
+ op: "AssignSub"
+ input: "batch_normalization_1/moving_variance"
+ input: "dnn/batch_normalization_2/AssignMovingAvg_1/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/batchnorm/add/y"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.0010000000474974513
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/batchnorm/add"
+ op: "Add"
+ input: "dnn/batch_normalization_2/Squeeze_1"
+ input: "dnn/batch_normalization_2/batchnorm/add/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/batchnorm/Rsqrt"
+ op: "Rsqrt"
+ input: "dnn/batch_normalization_2/batchnorm/add"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/batchnorm/mul"
+ op: "Mul"
+ input: "dnn/batch_normalization_2/batchnorm/Rsqrt"
+ input: "batch_normalization_1/gamma/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/batchnorm/mul_1"
+ op: "Mul"
+ input: "dnn/hidden2/Elu"
+ input: "dnn/batch_normalization_2/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/batchnorm/mul_2"
+ op: "Mul"
+ input: "dnn/batch_normalization_2/Squeeze"
+ input: "dnn/batch_normalization_2/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/batchnorm/sub"
+ op: "Sub"
+ input: "batch_normalization_1/beta/read"
+ input: "dnn/batch_normalization_2/batchnorm/mul_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_2/batchnorm/add_1"
+ op: "Add"
+ input: "dnn/batch_normalization_2/batchnorm/mul_1"
+ input: "dnn/batch_normalization_2/batchnorm/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/Elu_1"
+ op: "Elu"
+ input: "dnn/batch_normalization_2/batchnorm/add_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "outputs/kernel/Initializer/truncated_normal/shape"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "d\000\000\000\n\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "outputs/kernel/Initializer/truncated_normal/mean"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "outputs/kernel/Initializer/truncated_normal/stddev"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.16124515235424042
+ }
+ }
+ }
+ }
+ node {
+ name: "outputs/kernel/Initializer/truncated_normal/TruncatedNormal"
+ op: "TruncatedNormal"
+ input: "outputs/kernel/Initializer/truncated_normal/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "seed"
+ value {
+ i: 0
+ }
+ }
+ attr {
+ key: "seed2"
+ value {
+ i: 0
+ }
+ }
+ }
+ node {
+ name: "outputs/kernel/Initializer/truncated_normal/mul"
+ op: "Mul"
+ input: "outputs/kernel/Initializer/truncated_normal/TruncatedNormal"
+ input: "outputs/kernel/Initializer/truncated_normal/stddev"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "outputs/kernel/Initializer/truncated_normal"
+ op: "Add"
+ input: "outputs/kernel/Initializer/truncated_normal/mul"
+ input: "outputs/kernel/Initializer/truncated_normal/mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "outputs/kernel"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "outputs/kernel/Assign"
+ op: "Assign"
+ input: "outputs/kernel"
+ input: "outputs/kernel/Initializer/truncated_normal"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "outputs/kernel/read"
+ op: "Identity"
+ input: "outputs/kernel"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "outputs/bias/Initializer/zeros"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 10
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "outputs/bias"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "outputs/bias/Assign"
+ op: "Assign"
+ input: "outputs/bias"
+ input: "outputs/bias/Initializer/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "outputs/bias/read"
+ op: "Identity"
+ input: "outputs/bias"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/outputs/MatMul"
+ op: "MatMul"
+ input: "dnn/Elu_1"
+ input: "outputs/kernel/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "transpose_a"
+ value {
+ b: false
+ }
+ }
+ attr {
+ key: "transpose_b"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "dnn/outputs/BiasAdd"
+ op: "BiasAdd"
+ input: "dnn/outputs/MatMul"
+ input: "outputs/bias/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "data_format"
+ value {
+ s: "NHWC"
+ }
+ }
+ }
+ node {
+ name: "dnn/outputs/Selu"
+ op: "Selu"
+ input: "dnn/outputs/BiasAdd"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/gamma/Initializer/ones"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 10
+ }
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/gamma"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/gamma/Assign"
+ op: "Assign"
+ input: "batch_normalization_2/gamma"
+ input: "batch_normalization_2/gamma/Initializer/ones"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/gamma/read"
+ op: "Identity"
+ input: "batch_normalization_2/gamma"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/beta/Initializer/zeros"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 10
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/beta"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/beta/Assign"
+ op: "Assign"
+ input: "batch_normalization_2/beta"
+ input: "batch_normalization_2/beta/Initializer/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/beta/read"
+ op: "Identity"
+ input: "batch_normalization_2/beta"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/moving_mean/Initializer/zeros"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 10
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/moving_mean"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/moving_mean/Assign"
+ op: "Assign"
+ input: "batch_normalization_2/moving_mean"
+ input: "batch_normalization_2/moving_mean/Initializer/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/moving_mean/read"
+ op: "Identity"
+ input: "batch_normalization_2/moving_mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/moving_variance/Initializer/ones"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 10
+ }
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/moving_variance"
+ op: "VariableV2"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "container"
+ value {
+ s: ""
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "shape"
+ value {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ attr {
+ key: "shared_name"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/moving_variance/Assign"
+ op: "Assign"
+ input: "batch_normalization_2/moving_variance"
+ input: "batch_normalization_2/moving_variance/Initializer/ones"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "batch_normalization_2/moving_variance/read"
+ op: "Identity"
+ input: "batch_normalization_2/moving_variance"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/moments/mean/reduction_indices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/moments/mean"
+ op: "Mean"
+ input: "dnn/outputs/Selu"
+ input: "dnn/batch_normalization_3/moments/mean/reduction_indices"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/moments/StopGradient"
+ op: "StopGradient"
+ input: "dnn/batch_normalization_3/moments/mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/moments/SquaredDifference"
+ op: "SquaredDifference"
+ input: "dnn/outputs/Selu"
+ input: "dnn/batch_normalization_3/moments/StopGradient"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/moments/variance/reduction_indices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/moments/variance"
+ op: "Mean"
+ input: "dnn/batch_normalization_3/moments/SquaredDifference"
+ input: "dnn/batch_normalization_3/moments/variance/reduction_indices"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/moments/Squeeze"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_3/moments/mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/moments/Squeeze_1"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_3/moments/variance"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization_3/moments/Squeeze"
+ input: "dnn/batch_normalization_3/ExpandDims/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_1/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_1"
+ op: "ExpandDims"
+ input: "batch_normalization_2/moving_mean/read"
+ input: "dnn/batch_normalization_3/ExpandDims_1/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Reshape/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Reshape"
+ op: "Reshape"
+ input: "training"
+ input: "dnn/batch_normalization_3/Reshape/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Select"
+ op: "Select"
+ input: "dnn/batch_normalization_3/Reshape"
+ input: "dnn/batch_normalization_3/ExpandDims"
+ input: "dnn/batch_normalization_3/ExpandDims_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Squeeze"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_3/Select"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_2/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_2"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization_3/moments/Squeeze_1"
+ input: "dnn/batch_normalization_3/ExpandDims_2/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_3/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_3"
+ op: "ExpandDims"
+ input: "batch_normalization_2/moving_variance/read"
+ input: "dnn/batch_normalization_3/ExpandDims_3/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Reshape_1/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Reshape_1"
+ op: "Reshape"
+ input: "training"
+ input: "dnn/batch_normalization_3/Reshape_1/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Select_1"
+ op: "Select"
+ input: "dnn/batch_normalization_3/Reshape_1"
+ input: "dnn/batch_normalization_3/ExpandDims_2"
+ input: "dnn/batch_normalization_3/ExpandDims_3"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Squeeze_1"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_3/Select_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_4/input"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.8999999761581421
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_4/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_4"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization_3/ExpandDims_4/input"
+ input: "dnn/batch_normalization_3/ExpandDims_4/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_5/input"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_5/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/ExpandDims_5"
+ op: "ExpandDims"
+ input: "dnn/batch_normalization_3/ExpandDims_5/input"
+ input: "dnn/batch_normalization_3/ExpandDims_5/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Reshape_2/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Reshape_2"
+ op: "Reshape"
+ input: "training"
+ input: "dnn/batch_normalization_3/Reshape_2/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Select_2"
+ op: "Select"
+ input: "dnn/batch_normalization_3/Reshape_2"
+ input: "dnn/batch_normalization_3/ExpandDims_4"
+ input: "dnn/batch_normalization_3/ExpandDims_5"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/Squeeze_2"
+ op: "Squeeze"
+ input: "dnn/batch_normalization_3/Select_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "squeeze_dims"
+ value {
+ list {
+ i: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg/sub/x"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg/sub"
+ op: "Sub"
+ input: "dnn/batch_normalization_3/AssignMovingAvg/sub/x"
+ input: "dnn/batch_normalization_3/Squeeze_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg/sub_1"
+ op: "Sub"
+ input: "batch_normalization_2/moving_mean/read"
+ input: "dnn/batch_normalization_3/Squeeze"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg/mul"
+ op: "Mul"
+ input: "dnn/batch_normalization_3/AssignMovingAvg/sub_1"
+ input: "dnn/batch_normalization_3/AssignMovingAvg/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg"
+ op: "AssignSub"
+ input: "batch_normalization_2/moving_mean"
+ input: "dnn/batch_normalization_3/AssignMovingAvg/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg_1/sub/x"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg_1/sub"
+ op: "Sub"
+ input: "dnn/batch_normalization_3/AssignMovingAvg_1/sub/x"
+ input: "dnn/batch_normalization_3/Squeeze_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg_1/sub_1"
+ op: "Sub"
+ input: "batch_normalization_2/moving_variance/read"
+ input: "dnn/batch_normalization_3/Squeeze_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg_1/mul"
+ op: "Mul"
+ input: "dnn/batch_normalization_3/AssignMovingAvg_1/sub_1"
+ input: "dnn/batch_normalization_3/AssignMovingAvg_1/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/AssignMovingAvg_1"
+ op: "AssignSub"
+ input: "batch_normalization_2/moving_variance"
+ input: "dnn/batch_normalization_3/AssignMovingAvg_1/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/batchnorm/add/y"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.0010000000474974513
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/batchnorm/add"
+ op: "Add"
+ input: "dnn/batch_normalization_3/Squeeze_1"
+ input: "dnn/batch_normalization_3/batchnorm/add/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/batchnorm/Rsqrt"
+ op: "Rsqrt"
+ input: "dnn/batch_normalization_3/batchnorm/add"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/batchnorm/mul"
+ op: "Mul"
+ input: "dnn/batch_normalization_3/batchnorm/Rsqrt"
+ input: "batch_normalization_2/gamma/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/batchnorm/mul_1"
+ op: "Mul"
+ input: "dnn/outputs/Selu"
+ input: "dnn/batch_normalization_3/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/batchnorm/mul_2"
+ op: "Mul"
+ input: "dnn/batch_normalization_3/Squeeze"
+ input: "dnn/batch_normalization_3/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/batchnorm/sub"
+ op: "Sub"
+ input: "batch_normalization_2/beta/read"
+ input: "dnn/batch_normalization_3/batchnorm/mul_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "dnn/batch_normalization_3/batchnorm/add_1"
+ op: "Add"
+ input: "dnn/batch_normalization_3/batchnorm/mul_1"
+ input: "dnn/batch_normalization_3/batchnorm/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "loss/SparseSoftmaxCrossEntropyWithLogits/Shape"
+ op: "Shape"
+ input: "y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT64
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits"
+ op: "SparseSoftmaxCrossEntropyWithLogits"
+ input: "dnn/batch_normalization_3/batchnorm/add_1"
+ input: "y"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tlabels"
+ value {
+ type: DT_INT64
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "loss/Const"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "loss/loss"
+ op: "Mean"
+ input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits"
+ input: "loss/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/Const"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 1.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/Fill"
+ op: "Fill"
+ input: "train/gradients/Shape"
+ input: "train/gradients/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Reshape/shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/Fill"
+ input: "train/gradients/loss/loss_grad/Reshape/shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Shape"
+ op: "Shape"
+ input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Tile"
+ op: "Tile"
+ input: "train/gradients/loss/loss_grad/Reshape"
+ input: "train/gradients/loss/loss_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tmultiples"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Shape_1"
+ op: "Shape"
+ input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Shape_2"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Const"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/loss/loss_grad/Shape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Prod"
+ op: "Prod"
+ input: "train/gradients/loss/loss_grad/Shape_1"
+ input: "train/gradients/loss/loss_grad/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/loss/loss_grad/Shape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Const_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/loss/loss_grad/Shape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Prod_1"
+ op: "Prod"
+ input: "train/gradients/loss/loss_grad/Shape_2"
+ input: "train/gradients/loss/loss_grad/Const_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/loss/loss_grad/Shape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Maximum/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/loss/loss_grad/Shape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Maximum"
+ op: "Maximum"
+ input: "train/gradients/loss/loss_grad/Prod_1"
+ input: "train/gradients/loss/loss_grad/Maximum/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/loss/loss_grad/Shape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/floordiv"
+ op: "FloorDiv"
+ input: "train/gradients/loss/loss_grad/Prod"
+ input: "train/gradients/loss/loss_grad/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/loss/loss_grad/Shape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/Cast"
+ op: "Cast"
+ input: "train/gradients/loss/loss_grad/floordiv"
+ attr {
+ key: "DstT"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "SrcT"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/loss_grad/truediv"
+ op: "RealDiv"
+ input: "train/gradients/loss/loss_grad/Tile"
+ input: "train/gradients/loss/loss_grad/Cast"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/zeros_like"
+ op: "ZerosLike"
+ input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/PreventGradient"
+ op: "PreventGradient"
+ input: "loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "message"
+ value {
+ s: "Currently there is no way to take the second derivative of sparse_softmax_cross_entropy_with_logits due to the fused implementation\'s interaction with tf.gradients()"
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/ExpandDims/dim"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: -1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/ExpandDims"
+ op: "ExpandDims"
+ input: "train/gradients/loss/loss_grad/truediv"
+ input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/ExpandDims/dim"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tdim"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/mul"
+ op: "Mul"
+ input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/ExpandDims"
+ input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/PreventGradient"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Shape"
+ op: "Shape"
+ input: "dnn/batch_normalization_3/batchnorm/mul_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Shape"
+ op: "Shape"
+ input: "dnn/outputs/Selu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/tuple/control_dependency"
+ input: "dnn/batch_normalization_3/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/mul_1"
+ op: "Mul"
+ input: "dnn/outputs/Selu"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_1_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Neg"
+ op: "Neg"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Sum_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Neg"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/tuple/control_dependency_1"
+ input: "dnn/batch_normalization_3/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/mul_1"
+ op: "Mul"
+ input: "dnn/batch_normalization_3/Squeeze"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Squeeze_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000\n\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Squeeze_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_3/Squeeze_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/AddN"
+ op: "AddN"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_2_grad/tuple/control_dependency_1"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/mul"
+ op: "Mul"
+ input: "train/gradients/AddN"
+ input: "batch_normalization_2/gamma/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/mul_1"
+ op: "Mul"
+ input: "dnn/batch_normalization_3/batchnorm/Rsqrt"
+ input: "train/gradients/AddN"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_grad/zeros_like"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_grad/Select"
+ op: "Select"
+ input: "dnn/batch_normalization_3/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/Squeeze_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/Select_grad/zeros_like"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_grad/Select_1"
+ op: "Select"
+ input: "dnn/batch_normalization_3/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/Select_grad/zeros_like"
+ input: "train/gradients/dnn/batch_normalization_3/Squeeze_grad/Reshape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_3/Select_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization_3/Select_grad/Select_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/Select_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization_3/Select_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/Select_grad/Select"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/Select_grad/Select_1"
+ input: "^train/gradients/dnn/batch_normalization_3/Select_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/Select_grad/Select_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/Rsqrt_grad/RsqrtGrad"
+ op: "RsqrtGrad"
+ input: "dnn/batch_normalization_3/batchnorm/Rsqrt"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/ExpandDims_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/ExpandDims_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/Select_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_3/ExpandDims_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/Rsqrt_grad/RsqrtGrad"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/Rsqrt_grad/RsqrtGrad"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/Squeeze_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000\n\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/Squeeze_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/ExpandDims_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/Squeeze_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Squeeze_1_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000\n\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Squeeze_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/add_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_3/Squeeze_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_1_grad/zeros_like"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_1_grad/Select"
+ op: "Select"
+ input: "dnn/batch_normalization_3/Reshape_1"
+ input: "train/gradients/dnn/batch_normalization_3/Squeeze_1_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/Select_1_grad/zeros_like"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_1_grad/Select_1"
+ op: "Select"
+ input: "dnn/batch_normalization_3/Reshape_1"
+ input: "train/gradients/dnn/batch_normalization_3/Select_1_grad/zeros_like"
+ input: "train/gradients/dnn/batch_normalization_3/Squeeze_1_grad/Reshape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_1_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_3/Select_1_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization_3/Select_1_grad/Select_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_1_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/Select_1_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization_3/Select_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/Select_1_grad/Select"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/Select_1_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/Select_1_grad/Select_1"
+ input: "^train/gradients/dnn/batch_normalization_3/Select_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/Select_1_grad/Select_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/ExpandDims_2_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 10
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/ExpandDims_2_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/Select_1_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_3/ExpandDims_2_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/Squeeze_1_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000\n\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/Squeeze_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/ExpandDims_2_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/Squeeze_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ op: "Shape"
+ input: "dnn/batch_normalization_3/moments/SquaredDifference"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Size"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 2
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/add"
+ op: "Add"
+ input: "dnn/batch_normalization_3/moments/variance/reduction_indices"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/mod"
+ op: "FloorMod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/add"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/range/start"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/range/delta"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/range"
+ op: "Range"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/range/start"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Size"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/range/delta"
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Fill/value"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Fill"
+ op: "Fill"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_1"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Fill/value"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/DynamicStitch"
+ op: "DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/range"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/mod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Fill"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Maximum/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Maximum"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Maximum/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/floordiv"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/Squeeze_1_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/DynamicStitch"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Tile"
+ op: "Tile"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/floordiv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tmultiples"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_2"
+ op: "Shape"
+ input: "dnn/batch_normalization_3/moments/SquaredDifference"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_3"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000\n\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Const"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Prod"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_2"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Const_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Prod_1"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_3"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Const_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Maximum_1/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Maximum_1"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Prod_1"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Maximum_1/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/floordiv_1"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Prod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Maximum_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Cast"
+ op: "Cast"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/floordiv_1"
+ attr {
+ key: "DstT"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "SrcT"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/truediv"
+ op: "RealDiv"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Tile"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/Cast"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Shape"
+ op: "Shape"
+ input: "dnn/outputs/Selu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000\n\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/scalar"
+ op: "Const"
+ input: "^train/gradients/dnn/batch_normalization_3/moments/variance_grad/truediv"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 2.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/scalar"
+ input: "train/gradients/dnn/batch_normalization_3/moments/variance_grad/truediv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/sub"
+ op: "Sub"
+ input: "dnn/outputs/Selu"
+ input: "dnn/batch_normalization_3/moments/StopGradient"
+ input: "^train/gradients/dnn/batch_normalization_3/moments/variance_grad/truediv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/mul_1"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Neg"
+ op: "Neg"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Reshape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Neg"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Neg"
+ input: "^train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/Neg"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ op: "Shape"
+ input: "dnn/outputs/Selu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Size"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 2
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/add"
+ op: "Add"
+ input: "dnn/batch_normalization_3/moments/mean/reduction_indices"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/mod"
+ op: "FloorMod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/add"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/range/start"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/range/delta"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/range"
+ op: "Range"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/range/start"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Size"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/range/delta"
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Fill/value"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Fill"
+ op: "Fill"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_1"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Fill/value"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/DynamicStitch"
+ op: "DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/range"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/mod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Fill"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Maximum/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Maximum"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Maximum/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/floordiv"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/Squeeze_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/DynamicStitch"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Tile"
+ op: "Tile"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/floordiv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tmultiples"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_2"
+ op: "Shape"
+ input: "dnn/outputs/Selu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_3"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000\n\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Const"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Prod"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_2"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Const_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Prod_1"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_3"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Const_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Maximum_1/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Maximum_1"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Prod_1"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Maximum_1/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/floordiv_1"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Prod"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Maximum_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Cast"
+ op: "Cast"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/floordiv_1"
+ attr {
+ key: "DstT"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "SrcT"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/truediv"
+ op: "RealDiv"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Tile"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/Cast"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/AddN_1"
+ op: "AddN"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_3/moments/SquaredDifference_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_3/moments/mean_grad/truediv"
+ attr {
+ key: "N"
+ value {
+ i: 3
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_3/batchnorm/mul_1_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/outputs/Selu_grad/SeluGrad"
+ op: "SeluGrad"
+ input: "train/gradients/AddN_1"
+ input: "dnn/outputs/Selu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/outputs/BiasAdd_grad/BiasAddGrad"
+ op: "BiasAddGrad"
+ input: "train/gradients/dnn/outputs/Selu_grad/SeluGrad"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "data_format"
+ value {
+ s: "NHWC"
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/outputs/BiasAdd_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/outputs/Selu_grad/SeluGrad"
+ input: "^train/gradients/dnn/outputs/BiasAdd_grad/BiasAddGrad"
+ }
+ node {
+ name: "train/gradients/dnn/outputs/BiasAdd_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/outputs/Selu_grad/SeluGrad"
+ input: "^train/gradients/dnn/outputs/BiasAdd_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/outputs/Selu_grad/SeluGrad"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/outputs/BiasAdd_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/outputs/BiasAdd_grad/BiasAddGrad"
+ input: "^train/gradients/dnn/outputs/BiasAdd_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/outputs/BiasAdd_grad/BiasAddGrad"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/outputs/MatMul_grad/MatMul"
+ op: "MatMul"
+ input: "train/gradients/dnn/outputs/BiasAdd_grad/tuple/control_dependency"
+ input: "outputs/kernel/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "transpose_a"
+ value {
+ b: false
+ }
+ }
+ attr {
+ key: "transpose_b"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/outputs/MatMul_grad/MatMul_1"
+ op: "MatMul"
+ input: "dnn/Elu_1"
+ input: "train/gradients/dnn/outputs/BiasAdd_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "transpose_a"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "transpose_b"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/outputs/MatMul_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/outputs/MatMul_grad/MatMul"
+ input: "^train/gradients/dnn/outputs/MatMul_grad/MatMul_1"
+ }
+ node {
+ name: "train/gradients/dnn/outputs/MatMul_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/outputs/MatMul_grad/MatMul"
+ input: "^train/gradients/dnn/outputs/MatMul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/outputs/MatMul_grad/MatMul"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/outputs/MatMul_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/outputs/MatMul_grad/MatMul_1"
+ input: "^train/gradients/dnn/outputs/MatMul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/outputs/MatMul_grad/MatMul_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/Elu_1_grad/EluGrad"
+ op: "EluGrad"
+ input: "train/gradients/dnn/outputs/MatMul_grad/tuple/control_dependency"
+ input: "dnn/Elu_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Shape"
+ op: "Shape"
+ input: "dnn/batch_normalization_2/batchnorm/mul_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/Elu_1_grad/EluGrad"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/Elu_1_grad/EluGrad"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Shape"
+ op: "Shape"
+ input: "dnn/hidden2/Elu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/tuple/control_dependency"
+ input: "dnn/batch_normalization_2/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/mul_1"
+ op: "Mul"
+ input: "dnn/hidden2/Elu"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_1_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Neg"
+ op: "Neg"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Sum_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Neg"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/tuple/control_dependency_1"
+ input: "dnn/batch_normalization_2/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/mul_1"
+ op: "Mul"
+ input: "dnn/batch_normalization_2/Squeeze"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Squeeze_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000d\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Squeeze_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_2/Squeeze_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/AddN_2"
+ op: "AddN"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_2_grad/tuple/control_dependency_1"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/mul"
+ op: "Mul"
+ input: "train/gradients/AddN_2"
+ input: "batch_normalization_1/gamma/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/mul_1"
+ op: "Mul"
+ input: "dnn/batch_normalization_2/batchnorm/Rsqrt"
+ input: "train/gradients/AddN_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_grad/zeros_like"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_grad/Select"
+ op: "Select"
+ input: "dnn/batch_normalization_2/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/Squeeze_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/Select_grad/zeros_like"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_grad/Select_1"
+ op: "Select"
+ input: "dnn/batch_normalization_2/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/Select_grad/zeros_like"
+ input: "train/gradients/dnn/batch_normalization_2/Squeeze_grad/Reshape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_2/Select_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization_2/Select_grad/Select_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/Select_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization_2/Select_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/Select_grad/Select"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/Select_grad/Select_1"
+ input: "^train/gradients/dnn/batch_normalization_2/Select_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/Select_grad/Select_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/Rsqrt_grad/RsqrtGrad"
+ op: "RsqrtGrad"
+ input: "dnn/batch_normalization_2/batchnorm/Rsqrt"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/ExpandDims_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/ExpandDims_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/Select_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_2/ExpandDims_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/Rsqrt_grad/RsqrtGrad"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/Rsqrt_grad/RsqrtGrad"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/Squeeze_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000d\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/Squeeze_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/ExpandDims_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/Squeeze_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Squeeze_1_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000d\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Squeeze_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/add_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_2/Squeeze_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_1_grad/zeros_like"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_1_grad/Select"
+ op: "Select"
+ input: "dnn/batch_normalization_2/Reshape_1"
+ input: "train/gradients/dnn/batch_normalization_2/Squeeze_1_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/Select_1_grad/zeros_like"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_1_grad/Select_1"
+ op: "Select"
+ input: "dnn/batch_normalization_2/Reshape_1"
+ input: "train/gradients/dnn/batch_normalization_2/Select_1_grad/zeros_like"
+ input: "train/gradients/dnn/batch_normalization_2/Squeeze_1_grad/Reshape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_1_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_2/Select_1_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization_2/Select_1_grad/Select_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_1_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/Select_1_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization_2/Select_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/Select_1_grad/Select"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/Select_1_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/Select_1_grad/Select_1"
+ input: "^train/gradients/dnn/batch_normalization_2/Select_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/Select_1_grad/Select_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/ExpandDims_2_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 100
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/ExpandDims_2_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/Select_1_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_2/ExpandDims_2_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/Squeeze_1_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000d\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/Squeeze_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/ExpandDims_2_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/Squeeze_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ op: "Shape"
+ input: "dnn/batch_normalization_2/moments/SquaredDifference"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Size"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 2
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/add"
+ op: "Add"
+ input: "dnn/batch_normalization_2/moments/variance/reduction_indices"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/mod"
+ op: "FloorMod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/add"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/range/start"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/range/delta"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/range"
+ op: "Range"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/range/start"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Size"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/range/delta"
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Fill/value"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Fill"
+ op: "Fill"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_1"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Fill/value"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/DynamicStitch"
+ op: "DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/range"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/mod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Fill"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Maximum/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Maximum"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Maximum/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/floordiv"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/Squeeze_1_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/DynamicStitch"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Tile"
+ op: "Tile"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/floordiv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tmultiples"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_2"
+ op: "Shape"
+ input: "dnn/batch_normalization_2/moments/SquaredDifference"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_3"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000d\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Const"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Prod"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_2"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Const_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Prod_1"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_3"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Const_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Maximum_1/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Maximum_1"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Prod_1"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Maximum_1/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/floordiv_1"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Prod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Maximum_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Cast"
+ op: "Cast"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/floordiv_1"
+ attr {
+ key: "DstT"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "SrcT"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/truediv"
+ op: "RealDiv"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Tile"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/Cast"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Shape"
+ op: "Shape"
+ input: "dnn/hidden2/Elu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000d\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/scalar"
+ op: "Const"
+ input: "^train/gradients/dnn/batch_normalization_2/moments/variance_grad/truediv"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 2.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/scalar"
+ input: "train/gradients/dnn/batch_normalization_2/moments/variance_grad/truediv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/sub"
+ op: "Sub"
+ input: "dnn/hidden2/Elu"
+ input: "dnn/batch_normalization_2/moments/StopGradient"
+ input: "^train/gradients/dnn/batch_normalization_2/moments/variance_grad/truediv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/mul_1"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/mul"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Neg"
+ op: "Neg"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Reshape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Neg"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Neg"
+ input: "^train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/Neg"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ op: "Shape"
+ input: "dnn/hidden2/Elu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Size"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 2
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/add"
+ op: "Add"
+ input: "dnn/batch_normalization_2/moments/mean/reduction_indices"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/mod"
+ op: "FloorMod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/add"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/range/start"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/range/delta"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/range"
+ op: "Range"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/range/start"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Size"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/range/delta"
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Fill/value"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Fill"
+ op: "Fill"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_1"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Fill/value"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/DynamicStitch"
+ op: "DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/range"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/mod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Fill"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Maximum/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Maximum"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Maximum/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/floordiv"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/Squeeze_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/DynamicStitch"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Tile"
+ op: "Tile"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/floordiv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tmultiples"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_2"
+ op: "Shape"
+ input: "dnn/hidden2/Elu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_3"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000d\000\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Const"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Prod"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_2"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Const_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Prod_1"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_3"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Const_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Maximum_1/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Maximum_1"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Prod_1"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Maximum_1/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/floordiv_1"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Prod"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Maximum_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Cast"
+ op: "Cast"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/floordiv_1"
+ attr {
+ key: "DstT"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "SrcT"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/truediv"
+ op: "RealDiv"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Tile"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/Cast"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/AddN_3"
+ op: "AddN"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_2/moments/SquaredDifference_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization_2/moments/mean_grad/truediv"
+ attr {
+ key: "N"
+ value {
+ i: 3
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization_2/batchnorm/mul_1_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/Elu_grad/EluGrad"
+ op: "EluGrad"
+ input: "train/gradients/AddN_3"
+ input: "dnn/hidden2/Elu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/BiasAdd_grad/BiasAddGrad"
+ op: "BiasAddGrad"
+ input: "train/gradients/dnn/hidden2/Elu_grad/EluGrad"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "data_format"
+ value {
+ s: "NHWC"
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/BiasAdd_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/hidden2/Elu_grad/EluGrad"
+ input: "^train/gradients/dnn/hidden2/BiasAdd_grad/BiasAddGrad"
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/BiasAdd_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden2/Elu_grad/EluGrad"
+ input: "^train/gradients/dnn/hidden2/BiasAdd_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden2/Elu_grad/EluGrad"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/BiasAdd_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden2/BiasAdd_grad/BiasAddGrad"
+ input: "^train/gradients/dnn/hidden2/BiasAdd_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden2/BiasAdd_grad/BiasAddGrad"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/MatMul_grad/MatMul"
+ op: "MatMul"
+ input: "train/gradients/dnn/hidden2/BiasAdd_grad/tuple/control_dependency"
+ input: "hidden2/kernel/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "transpose_a"
+ value {
+ b: false
+ }
+ }
+ attr {
+ key: "transpose_b"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/MatMul_grad/MatMul_1"
+ op: "MatMul"
+ input: "dnn/Elu"
+ input: "train/gradients/dnn/hidden2/BiasAdd_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "transpose_a"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "transpose_b"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/MatMul_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/hidden2/MatMul_grad/MatMul"
+ input: "^train/gradients/dnn/hidden2/MatMul_grad/MatMul_1"
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/MatMul_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden2/MatMul_grad/MatMul"
+ input: "^train/gradients/dnn/hidden2/MatMul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden2/MatMul_grad/MatMul"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden2/MatMul_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden2/MatMul_grad/MatMul_1"
+ input: "^train/gradients/dnn/hidden2/MatMul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden2/MatMul_grad/MatMul_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/Elu_grad/EluGrad"
+ op: "EluGrad"
+ input: "train/gradients/dnn/hidden2/MatMul_grad/tuple/control_dependency"
+ input: "dnn/Elu"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Shape"
+ op: "Shape"
+ input: "dnn/batch_normalization/batchnorm/mul_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/Elu_grad/EluGrad"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/Elu_grad/EluGrad"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Shape"
+ op: "Shape"
+ input: "dnn/hidden1/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/tuple/control_dependency"
+ input: "dnn/batch_normalization/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/mul"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/mul_1"
+ op: "Mul"
+ input: "dnn/hidden1/Maximum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_1_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Neg"
+ op: "Neg"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Sum_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Neg"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/sub_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/sub_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/sub_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/tuple/control_dependency_1"
+ input: "dnn/batch_normalization/batchnorm/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/mul"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/mul_1"
+ op: "Mul"
+ input: "dnn/batch_normalization/Squeeze"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Squeeze_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000,\001\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Squeeze_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization/Squeeze_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/AddN_4"
+ op: "AddN"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_2_grad/tuple/control_dependency_1"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/mul"
+ op: "Mul"
+ input: "train/gradients/AddN_4"
+ input: "batch_normalization/gamma/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/mul"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/mul_1"
+ op: "Mul"
+ input: "dnn/batch_normalization/batchnorm/Rsqrt"
+ input: "train/gradients/AddN_4"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/mul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/mul_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_grad/zeros_like"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_grad/Select"
+ op: "Select"
+ input: "dnn/batch_normalization/Reshape"
+ input: "train/gradients/dnn/batch_normalization/Squeeze_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization/Select_grad/zeros_like"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_grad/Select_1"
+ op: "Select"
+ input: "dnn/batch_normalization/Reshape"
+ input: "train/gradients/dnn/batch_normalization/Select_grad/zeros_like"
+ input: "train/gradients/dnn/batch_normalization/Squeeze_grad/Reshape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization/Select_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization/Select_grad/Select_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/Select_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization/Select_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/Select_grad/Select"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/Select_grad/Select_1"
+ input: "^train/gradients/dnn/batch_normalization/Select_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/Select_grad/Select_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/Rsqrt_grad/RsqrtGrad"
+ op: "RsqrtGrad"
+ input: "dnn/batch_normalization/batchnorm/Rsqrt"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/ExpandDims_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/ExpandDims_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/Select_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization/ExpandDims_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/Rsqrt_grad/RsqrtGrad"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/Rsqrt_grad/RsqrtGrad"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/add_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/add_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/add_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/add_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/Reshape_1"
+ input: "^train/gradients/dnn/batch_normalization/batchnorm/add_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/add_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/Squeeze_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000,\001\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/Squeeze_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/ExpandDims_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/Squeeze_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Squeeze_1_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000,\001\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Squeeze_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/add_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization/Squeeze_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_1_grad/zeros_like"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_1_grad/Select"
+ op: "Select"
+ input: "dnn/batch_normalization/Reshape_1"
+ input: "train/gradients/dnn/batch_normalization/Squeeze_1_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization/Select_1_grad/zeros_like"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_1_grad/Select_1"
+ op: "Select"
+ input: "dnn/batch_normalization/Reshape_1"
+ input: "train/gradients/dnn/batch_normalization/Select_1_grad/zeros_like"
+ input: "train/gradients/dnn/batch_normalization/Squeeze_1_grad/Reshape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_1_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization/Select_1_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization/Select_1_grad/Select_1"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_1_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/Select_1_grad/Select"
+ input: "^train/gradients/dnn/batch_normalization/Select_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/Select_1_grad/Select"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/Select_1_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/Select_1_grad/Select_1"
+ input: "^train/gradients/dnn/batch_normalization/Select_1_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/Select_1_grad/Select_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/ExpandDims_2_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 300
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/ExpandDims_2_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/Select_1_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization/ExpandDims_2_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/Squeeze_1_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000,\001\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/Squeeze_1_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/ExpandDims_2_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/Squeeze_1_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ op: "Shape"
+ input: "dnn/batch_normalization/moments/SquaredDifference"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Size"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 2
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/add"
+ op: "Add"
+ input: "dnn/batch_normalization/moments/variance/reduction_indices"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/mod"
+ op: "FloorMod"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/add"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/range/start"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/range/delta"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/range"
+ op: "Range"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/range/start"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Size"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/range/delta"
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Fill/value"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Fill"
+ op: "Fill"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_1"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Fill/value"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/DynamicStitch"
+ op: "DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/range"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/mod"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Fill"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Maximum/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Maximum"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Maximum/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/floordiv"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/Squeeze_1_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/DynamicStitch"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Tile"
+ op: "Tile"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/floordiv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tmultiples"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_2"
+ op: "Shape"
+ input: "dnn/batch_normalization/moments/SquaredDifference"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_3"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000,\001\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Const"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Prod"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_2"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Const_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Prod_1"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_3"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Const_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Maximum_1/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Maximum_1"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Prod_1"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Maximum_1/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/floordiv_1"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Prod"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Maximum_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/variance_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/Cast"
+ op: "Cast"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/floordiv_1"
+ attr {
+ key: "DstT"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "SrcT"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/variance_grad/truediv"
+ op: "RealDiv"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Tile"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/Cast"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Shape"
+ op: "Shape"
+ input: "dnn/hidden1/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000,\001\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/scalar"
+ op: "Const"
+ input: "^train/gradients/dnn/batch_normalization/moments/variance_grad/truediv"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 2.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/scalar"
+ input: "train/gradients/dnn/batch_normalization/moments/variance_grad/truediv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/sub"
+ op: "Sub"
+ input: "dnn/hidden1/Maximum"
+ input: "dnn/batch_normalization/moments/StopGradient"
+ input: "^train/gradients/dnn/batch_normalization/moments/variance_grad/truediv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/mul_1"
+ op: "Mul"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/mul"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/sub"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Sum"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/mul_1"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Sum_1"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Neg"
+ op: "Neg"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Reshape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Neg"
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Reshape"
+ input: "^train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Neg"
+ input: "^train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/Neg"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ op: "Shape"
+ input: "dnn/hidden1/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Size"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 2
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/add"
+ op: "Add"
+ input: "dnn/batch_normalization/moments/mean/reduction_indices"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/mod"
+ op: "FloorMod"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/add"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Size"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/range/start"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/range/delta"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/range"
+ op: "Range"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/range/start"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Size"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/range/delta"
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Fill/value"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Fill"
+ op: "Fill"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_1"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Fill/value"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/DynamicStitch"
+ op: "DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/range"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/mod"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Fill"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Maximum/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Maximum"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/DynamicStitch"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Maximum/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/floordiv"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/Squeeze_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/DynamicStitch"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Tile"
+ op: "Tile"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Reshape"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/floordiv"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tmultiples"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_2"
+ op: "Shape"
+ input: "dnn/hidden1/Maximum"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_3"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 2
+ }
+ }
+ tensor_content: "\001\000\000\000,\001\000\000"
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Const"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Prod"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_2"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Const_1"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Prod_1"
+ op: "Prod"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_3"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Const_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Maximum_1/y"
+ op: "Const"
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Maximum_1"
+ op: "Maximum"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Prod_1"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Maximum_1/y"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/floordiv_1"
+ op: "FloorDiv"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Prod"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Maximum_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/moments/mean_grad/Shape_2"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/Cast"
+ op: "Cast"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/floordiv_1"
+ attr {
+ key: "DstT"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "SrcT"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/batch_normalization/moments/mean_grad/truediv"
+ op: "RealDiv"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Tile"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/Cast"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/AddN_5"
+ op: "AddN"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization/moments/SquaredDifference_grad/tuple/control_dependency"
+ input: "train/gradients/dnn/batch_normalization/moments/mean_grad/truediv"
+ attr {
+ key: "N"
+ value {
+ i: 3
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/batch_normalization/batchnorm/mul_1_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/Shape"
+ op: "Shape"
+ input: "dnn/hidden1/mul"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/Shape_1"
+ op: "Shape"
+ input: "dnn/hidden1/BiasAdd"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/Shape_2"
+ op: "Shape"
+ input: "train/gradients/AddN_5"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/zeros/Const"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.0
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/zeros"
+ op: "Fill"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Shape_2"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/zeros/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/GreaterEqual"
+ op: "GreaterEqual"
+ input: "dnn/hidden1/mul"
+ input: "dnn/hidden1/BiasAdd"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Shape"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/Select"
+ op: "Select"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/GreaterEqual"
+ input: "train/gradients/AddN_5"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/zeros"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/Select_1"
+ op: "Select"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/GreaterEqual"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/zeros"
+ input: "train/gradients/AddN_5"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Select"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Sum"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Select_1"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Sum_1"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/hidden1/Maximum_grad/Reshape"
+ input: "^train/gradients/dnn/hidden1/Maximum_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Reshape"
+ input: "^train/gradients/dnn/hidden1/Maximum_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden1/Maximum_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/Maximum_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/Reshape_1"
+ input: "^train/gradients/dnn/hidden1/Maximum_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden1/Maximum_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/Shape"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/Shape_1"
+ op: "Shape"
+ input: "dnn/hidden1/BiasAdd"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 2
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "out_type"
+ value {
+ type: DT_INT32
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/BroadcastGradientArgs"
+ op: "BroadcastGradientArgs"
+ input: "train/gradients/dnn/hidden1/mul_grad/Shape"
+ input: "train/gradients/dnn/hidden1/mul_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/mul"
+ op: "Mul"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/tuple/control_dependency"
+ input: "dnn/hidden1/BiasAdd"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/Sum"
+ op: "Sum"
+ input: "train/gradients/dnn/hidden1/mul_grad/mul"
+ input: "train/gradients/dnn/hidden1/mul_grad/BroadcastGradientArgs"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/Reshape"
+ op: "Reshape"
+ input: "train/gradients/dnn/hidden1/mul_grad/Sum"
+ input: "train/gradients/dnn/hidden1/mul_grad/Shape"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/mul_1"
+ op: "Mul"
+ input: "dnn/hidden1/mul/x"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/Sum_1"
+ op: "Sum"
+ input: "train/gradients/dnn/hidden1/mul_grad/mul_1"
+ input: "train/gradients/dnn/hidden1/mul_grad/BroadcastGradientArgs:1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/Reshape_1"
+ op: "Reshape"
+ input: "train/gradients/dnn/hidden1/mul_grad/Sum_1"
+ input: "train/gradients/dnn/hidden1/mul_grad/Shape_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tshape"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/hidden1/mul_grad/Reshape"
+ input: "^train/gradients/dnn/hidden1/mul_grad/Reshape_1"
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden1/mul_grad/Reshape"
+ input: "^train/gradients/dnn/hidden1/mul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden1/mul_grad/Reshape"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/mul_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden1/mul_grad/Reshape_1"
+ input: "^train/gradients/dnn/hidden1/mul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden1/mul_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/AddN_6"
+ op: "AddN"
+ input: "train/gradients/dnn/hidden1/Maximum_grad/tuple/control_dependency_1"
+ input: "train/gradients/dnn/hidden1/mul_grad/tuple/control_dependency_1"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden1/Maximum_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/BiasAdd_grad/BiasAddGrad"
+ op: "BiasAddGrad"
+ input: "train/gradients/AddN_6"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "data_format"
+ value {
+ s: "NHWC"
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/BiasAdd_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/AddN_6"
+ input: "^train/gradients/dnn/hidden1/BiasAdd_grad/BiasAddGrad"
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/BiasAdd_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/AddN_6"
+ input: "^train/gradients/dnn/hidden1/BiasAdd_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden1/Maximum_grad/Reshape_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/BiasAdd_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden1/BiasAdd_grad/BiasAddGrad"
+ input: "^train/gradients/dnn/hidden1/BiasAdd_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden1/BiasAdd_grad/BiasAddGrad"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/MatMul_grad/MatMul"
+ op: "MatMul"
+ input: "train/gradients/dnn/hidden1/BiasAdd_grad/tuple/control_dependency"
+ input: "hidden1/kernel/read"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 784
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "transpose_a"
+ value {
+ b: false
+ }
+ }
+ attr {
+ key: "transpose_b"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/MatMul_grad/MatMul_1"
+ op: "MatMul"
+ input: "X"
+ input: "train/gradients/dnn/hidden1/BiasAdd_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "transpose_a"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "transpose_b"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/MatMul_grad/tuple/group_deps"
+ op: "NoOp"
+ input: "^train/gradients/dnn/hidden1/MatMul_grad/MatMul"
+ input: "^train/gradients/dnn/hidden1/MatMul_grad/MatMul_1"
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/MatMul_grad/tuple/control_dependency"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden1/MatMul_grad/MatMul"
+ input: "^train/gradients/dnn/hidden1/MatMul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden1/MatMul_grad/MatMul"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 784
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/gradients/dnn/hidden1/MatMul_grad/tuple/control_dependency_1"
+ op: "Identity"
+ input: "train/gradients/dnn/hidden1/MatMul_grad/MatMul_1"
+ input: "^train/gradients/dnn/hidden1/MatMul_grad/tuple/group_deps"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@train/gradients/dnn/hidden1/MatMul_grad/MatMul_1"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/learning_rate"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_FLOAT
+ tensor_shape {
+ }
+ float_val: 0.009999999776482582
+ }
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_hidden1/kernel/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "hidden1/kernel"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/hidden1/MatMul_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_hidden1/bias/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "hidden1/bias"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/hidden1/BiasAdd_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_batch_normalization/gamma/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "batch_normalization/gamma"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/mul_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_batch_normalization/beta/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "batch_normalization/beta"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/batch_normalization/batchnorm/sub_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_hidden2/kernel/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "hidden2/kernel"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/hidden2/MatMul_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_hidden2/bias/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "hidden2/bias"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/hidden2/BiasAdd_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_batch_normalization_1/gamma/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "batch_normalization_1/gamma"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/mul_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_batch_normalization_1/beta/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "batch_normalization_1/beta"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/batch_normalization_2/batchnorm/sub_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_outputs/kernel/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "outputs/kernel"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/outputs/MatMul_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_outputs/bias/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "outputs/bias"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/outputs/BiasAdd_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_batch_normalization_2/gamma/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "batch_normalization_2/gamma"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/mul_grad/tuple/control_dependency_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent/update_batch_normalization_2/beta/ApplyGradientDescent"
+ op: "ApplyGradientDescent"
+ input: "batch_normalization_2/beta"
+ input: "train/GradientDescent/learning_rate"
+ input: "train/gradients/dnn/batch_normalization_3/batchnorm/sub_grad/tuple/control_dependency"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "train/GradientDescent"
+ op: "NoOp"
+ input: "^train/GradientDescent/update_hidden1/kernel/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_hidden1/bias/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_batch_normalization/gamma/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_batch_normalization/beta/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_hidden2/kernel/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_hidden2/bias/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_batch_normalization_1/gamma/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_batch_normalization_1/beta/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_outputs/kernel/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_outputs/bias/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_batch_normalization_2/gamma/ApplyGradientDescent"
+ input: "^train/GradientDescent/update_batch_normalization_2/beta/ApplyGradientDescent"
+ }
+ node {
+ name: "eval/in_top_k/InTopKV2/k"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT64
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT64
+ tensor_shape {
+ }
+ int64_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "eval/in_top_k/InTopKV2"
+ op: "InTopKV2"
+ input: "dnn/batch_normalization_3/batchnorm/add_1"
+ input: "y"
+ input: "eval/in_top_k/InTopKV2/k"
+ attr {
+ key: "T"
+ value {
+ type: DT_INT64
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "eval/Cast"
+ op: "Cast"
+ input: "eval/in_top_k/InTopKV2"
+ attr {
+ key: "DstT"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "SrcT"
+ value {
+ type: DT_BOOL
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: -1
+ }
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "eval/Const"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "eval/Mean"
+ op: "Mean"
+ input: "eval/Cast"
+ input: "eval/Const"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "Tidx"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "keep_dims"
+ value {
+ b: false
+ }
+ }
+ }
+ node {
+ name: "init"
+ op: "NoOp"
+ input: "^hidden1/kernel/Assign"
+ input: "^hidden1/bias/Assign"
+ input: "^batch_normalization/gamma/Assign"
+ input: "^batch_normalization/beta/Assign"
+ input: "^batch_normalization/moving_mean/Assign"
+ input: "^batch_normalization/moving_variance/Assign"
+ input: "^hidden2/kernel/Assign"
+ input: "^hidden2/bias/Assign"
+ input: "^batch_normalization_1/gamma/Assign"
+ input: "^batch_normalization_1/beta/Assign"
+ input: "^batch_normalization_1/moving_mean/Assign"
+ input: "^batch_normalization_1/moving_variance/Assign"
+ input: "^outputs/kernel/Assign"
+ input: "^outputs/bias/Assign"
+ input: "^batch_normalization_2/gamma/Assign"
+ input: "^batch_normalization_2/beta/Assign"
+ input: "^batch_normalization_2/moving_mean/Assign"
+ input: "^batch_normalization_2/moving_variance/Assign"
+ }
+ node {
+ name: "Accuracy/tags"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ }
+ string_val: "Accuracy"
+ }
+ }
+ }
+ }
+ node {
+ name: "Accuracy"
+ op: "ScalarSummary"
+ input: "Accuracy/tags"
+ input: "eval/Mean"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Const"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ }
+ string_val: "model"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/StringJoin/inputs_1"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ }
+ string_val: "_temp_2105935f653947478038680db7095a2a/part"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/StringJoin"
+ op: "StringJoin"
+ input: "save/Const"
+ input: "save/StringJoin/inputs_1"
+ attr {
+ key: "N"
+ value {
+ i: 2
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "separator"
+ value {
+ s: ""
+ }
+ }
+ }
+ node {
+ name: "save/num_shards"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 1
+ }
+ }
+ }
+ }
+ node {
+ name: "save/ShardedFilename/shard"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_INT32
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_INT32
+ tensor_shape {
+ }
+ int_val: 0
+ }
+ }
+ }
+ }
+ node {
+ name: "save/ShardedFilename"
+ op: "ShardedFilename"
+ input: "save/StringJoin"
+ input: "save/ShardedFilename/shard"
+ input: "save/num_shards"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "save/SaveV2/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 18
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 18
+ }
+ }
+ string_val: "batch_normalization/beta"
+ string_val: "batch_normalization/gamma"
+ string_val: "batch_normalization/moving_mean"
+ string_val: "batch_normalization/moving_variance"
+ string_val: "batch_normalization_1/beta"
+ string_val: "batch_normalization_1/gamma"
+ string_val: "batch_normalization_1/moving_mean"
+ string_val: "batch_normalization_1/moving_variance"
+ string_val: "batch_normalization_2/beta"
+ string_val: "batch_normalization_2/gamma"
+ string_val: "batch_normalization_2/moving_mean"
+ string_val: "batch_normalization_2/moving_variance"
+ string_val: "hidden1/bias"
+ string_val: "hidden1/kernel"
+ string_val: "hidden2/bias"
+ string_val: "hidden2/kernel"
+ string_val: "outputs/bias"
+ string_val: "outputs/kernel"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/SaveV2/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 18
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 18
+ }
+ }
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/SaveV2"
+ op: "SaveV2"
+ input: "save/ShardedFilename"
+ input: "save/SaveV2/tensor_names"
+ input: "save/SaveV2/shape_and_slices"
+ input: "batch_normalization/beta"
+ input: "batch_normalization/gamma"
+ input: "batch_normalization/moving_mean"
+ input: "batch_normalization/moving_variance"
+ input: "batch_normalization_1/beta"
+ input: "batch_normalization_1/gamma"
+ input: "batch_normalization_1/moving_mean"
+ input: "batch_normalization_1/moving_variance"
+ input: "batch_normalization_2/beta"
+ input: "batch_normalization_2/gamma"
+ input: "batch_normalization_2/moving_mean"
+ input: "batch_normalization_2/moving_variance"
+ input: "hidden1/bias"
+ input: "hidden1/kernel"
+ input: "hidden2/bias"
+ input: "hidden2/kernel"
+ input: "outputs/bias"
+ input: "outputs/kernel"
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/control_dependency"
+ op: "Identity"
+ input: "save/ShardedFilename"
+ input: "^save/SaveV2"
+ attr {
+ key: "T"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@save/ShardedFilename"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "save/MergeV2Checkpoints/checkpoint_prefixes"
+ op: "Pack"
+ input: "save/ShardedFilename"
+ input: "^save/control_dependency"
+ attr {
+ key: "N"
+ value {
+ i: 1
+ }
+ }
+ attr {
+ key: "T"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "axis"
+ value {
+ i: 0
+ }
+ }
+ }
+ node {
+ name: "save/MergeV2Checkpoints"
+ op: "MergeV2Checkpoints"
+ input: "save/MergeV2Checkpoints/checkpoint_prefixes"
+ input: "save/Const"
+ attr {
+ key: "delete_old_dirs"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/Identity"
+ op: "Identity"
+ input: "save/Const"
+ input: "^save/control_dependency"
+ input: "^save/MergeV2Checkpoints"
+ attr {
+ key: "T"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ }
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization/beta"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2/tensor_names"
+ input: "save/RestoreV2/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign"
+ op: "Assign"
+ input: "batch_normalization/beta"
+ input: "save/RestoreV2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_1/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization/gamma"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_1/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_1"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_1/tensor_names"
+ input: "save/RestoreV2_1/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_1"
+ op: "Assign"
+ input: "batch_normalization/gamma"
+ input: "save/RestoreV2_1"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_2/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization/moving_mean"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_2/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_2"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_2/tensor_names"
+ input: "save/RestoreV2_2/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_2"
+ op: "Assign"
+ input: "batch_normalization/moving_mean"
+ input: "save/RestoreV2_2"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_3/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization/moving_variance"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_3/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_3"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_3/tensor_names"
+ input: "save/RestoreV2_3/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_3"
+ op: "Assign"
+ input: "batch_normalization/moving_variance"
+ input: "save/RestoreV2_3"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_4/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization_1/beta"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_4/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_4"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_4/tensor_names"
+ input: "save/RestoreV2_4/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_4"
+ op: "Assign"
+ input: "batch_normalization_1/beta"
+ input: "save/RestoreV2_4"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_5/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization_1/gamma"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_5/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_5"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_5/tensor_names"
+ input: "save/RestoreV2_5/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_5"
+ op: "Assign"
+ input: "batch_normalization_1/gamma"
+ input: "save/RestoreV2_5"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_6/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_6/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_6"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_6/tensor_names"
+ input: "save/RestoreV2_6/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_6"
+ op: "Assign"
+ input: "batch_normalization_1/moving_mean"
+ input: "save/RestoreV2_6"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_7/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_7/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_7"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_7/tensor_names"
+ input: "save/RestoreV2_7/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_7"
+ op: "Assign"
+ input: "batch_normalization_1/moving_variance"
+ input: "save/RestoreV2_7"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_1/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_8/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization_2/beta"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_8/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_8"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_8/tensor_names"
+ input: "save/RestoreV2_8/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_8"
+ op: "Assign"
+ input: "batch_normalization_2/beta"
+ input: "save/RestoreV2_8"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/beta"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_9/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization_2/gamma"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_9/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_9"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_9/tensor_names"
+ input: "save/RestoreV2_9/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_9"
+ op: "Assign"
+ input: "batch_normalization_2/gamma"
+ input: "save/RestoreV2_9"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/gamma"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_10/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_10/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_10"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_10/tensor_names"
+ input: "save/RestoreV2_10/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_10"
+ op: "Assign"
+ input: "batch_normalization_2/moving_mean"
+ input: "save/RestoreV2_10"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_mean"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_11/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_11/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_11"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_11/tensor_names"
+ input: "save/RestoreV2_11/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_11"
+ op: "Assign"
+ input: "batch_normalization_2/moving_variance"
+ input: "save/RestoreV2_11"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@batch_normalization_2/moving_variance"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_12/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "hidden1/bias"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_12/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_12"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_12/tensor_names"
+ input: "save/RestoreV2_12/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_12"
+ op: "Assign"
+ input: "hidden1/bias"
+ input: "save/RestoreV2_12"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_13/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "hidden1/kernel"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_13/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_13"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_13/tensor_names"
+ input: "save/RestoreV2_13/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_13"
+ op: "Assign"
+ input: "hidden1/kernel"
+ input: "save/RestoreV2_13"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden1/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 784
+ }
+ dim {
+ size: 300
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_14/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "hidden2/bias"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_14/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_14"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_14/tensor_names"
+ input: "save/RestoreV2_14/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_14"
+ op: "Assign"
+ input: "hidden2/bias"
+ input: "save/RestoreV2_14"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_15/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "hidden2/kernel"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_15/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_15"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_15/tensor_names"
+ input: "save/RestoreV2_15/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_15"
+ op: "Assign"
+ input: "hidden2/kernel"
+ input: "save/RestoreV2_15"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@hidden2/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 300
+ }
+ dim {
+ size: 100
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_16/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "outputs/bias"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_16/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_16"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_16/tensor_names"
+ input: "save/RestoreV2_16/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_16"
+ op: "Assign"
+ input: "outputs/bias"
+ input: "save/RestoreV2_16"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/bias"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_17/tensor_names"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: "outputs/kernel"
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_17/shape_and_slices"
+ op: "Const"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 1
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtype"
+ value {
+ type: DT_STRING
+ }
+ }
+ attr {
+ key: "value"
+ value {
+ tensor {
+ dtype: DT_STRING
+ tensor_shape {
+ dim {
+ size: 1
+ }
+ }
+ string_val: ""
+ }
+ }
+ }
+ }
+ node {
+ name: "save/RestoreV2_17"
+ op: "RestoreV2"
+ input: "save/Const"
+ input: "save/RestoreV2_17/tensor_names"
+ input: "save/RestoreV2_17/shape_and_slices"
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ unknown_rank: true
+ }
+ }
+ }
+ }
+ attr {
+ key: "dtypes"
+ value {
+ list {
+ type: DT_FLOAT
+ }
+ }
+ }
+ }
+ node {
+ name: "save/Assign_17"
+ op: "Assign"
+ input: "outputs/kernel"
+ input: "save/RestoreV2_17"
+ attr {
+ key: "T"
+ value {
+ type: DT_FLOAT
+ }
+ }
+ attr {
+ key: "_class"
+ value {
+ list {
+ s: "loc:@outputs/kernel"
+ }
+ }
+ }
+ attr {
+ key: "_output_shapes"
+ value {
+ list {
+ shape {
+ dim {
+ size: 100
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ }
+ attr {
+ key: "use_locking"
+ value {
+ b: true
+ }
+ }
+ attr {
+ key: "validate_shape"
+ value {
+ b: true
+ }
+ }
+ }
+ node {
+ name: "save/restore_shard"
+ op: "NoOp"
+ input: "^save/Assign"
+ input: "^save/Assign_1"
+ input: "^save/Assign_2"
+ input: "^save/Assign_3"
+ input: "^save/Assign_4"
+ input: "^save/Assign_5"
+ input: "^save/Assign_6"
+ input: "^save/Assign_7"
+ input: "^save/Assign_8"
+ input: "^save/Assign_9"
+ input: "^save/Assign_10"
+ input: "^save/Assign_11"
+ input: "^save/Assign_12"
+ input: "^save/Assign_13"
+ input: "^save/Assign_14"
+ input: "^save/Assign_15"
+ input: "^save/Assign_16"
+ input: "^save/Assign_17"
+ }
+ node {
+ name: "save/restore_all"
+ op: "NoOp"
+ input: "^save/restore_shard"
+ }
+ versions {
+ producer: 24
+ }
+ }
+ saver_def {
+ filename_tensor_name: "save/Const:0"
+ save_tensor_name: "save/Identity:0"
+ restore_op_name: "save/restore_all"
+ max_to_keep: 5
+ sharded: true
+ keep_checkpoint_every_n_hours: 10000.0
+ version: V2
+ }
+ collection_def {
+ key: "summaries"
+ value {
+ node_list {
+ value: "Accuracy:0"
+ }
+ }
+ }
+ collection_def {
+ key: "train_op"
+ value {
+ node_list {
+ value: "train/GradientDescent"
+ }
+ }
+ }
+ collection_def {
+ key: "trainable_variables"
+ value {
+ bytes_list {
+ value: "\n\020hidden1/kernel:0\022\025hidden1/kernel/Assign\032\025hidden1/kernel/read:02-hidden1/kernel/Initializer/truncated_normal:0"
+ value: "\n\016hidden1/bias:0\022\023hidden1/bias/Assign\032\023hidden1/bias/read:02 hidden1/bias/Initializer/zeros:0"
+ value: "\n\033batch_normalization/gamma:0\022 batch_normalization/gamma/Assign\032 batch_normalization/gamma/read:02,batch_normalization/gamma/Initializer/ones:0"
+ value: "\n\032batch_normalization/beta:0\022\037batch_normalization/beta/Assign\032\037batch_normalization/beta/read:02,batch_normalization/beta/Initializer/zeros:0"
+ value: "\n\020hidden2/kernel:0\022\025hidden2/kernel/Assign\032\025hidden2/kernel/read:02-hidden2/kernel/Initializer/truncated_normal:0"
+ value: "\n\016hidden2/bias:0\022\023hidden2/bias/Assign\032\023hidden2/bias/read:02 hidden2/bias/Initializer/zeros:0"
+ value: "\n\035batch_normalization_1/gamma:0\022\"batch_normalization_1/gamma/Assign\032\"batch_normalization_1/gamma/read:02.batch_normalization_1/gamma/Initializer/ones:0"
+ value: "\n\034batch_normalization_1/beta:0\022!batch_normalization_1/beta/Assign\032!batch_normalization_1/beta/read:02.batch_normalization_1/beta/Initializer/zeros:0"
+ value: "\n\020outputs/kernel:0\022\025outputs/kernel/Assign\032\025outputs/kernel/read:02-outputs/kernel/Initializer/truncated_normal:0"
+ value: "\n\016outputs/bias:0\022\023outputs/bias/Assign\032\023outputs/bias/read:02 outputs/bias/Initializer/zeros:0"
+ value: "\n\035batch_normalization_2/gamma:0\022\"batch_normalization_2/gamma/Assign\032\"batch_normalization_2/gamma/read:02.batch_normalization_2/gamma/Initializer/ones:0"
+ value: "\n\034batch_normalization_2/beta:0\022!batch_normalization_2/beta/Assign\032!batch_normalization_2/beta/read:02.batch_normalization_2/beta/Initializer/zeros:0"
+ }
+ }
+ }
+ collection_def {
+ key: "update_ops"
+ value {
+ node_list {
+ value: "dnn/batch_normalization/AssignMovingAvg:0"
+ value: "dnn/batch_normalization/AssignMovingAvg_1:0"
+ value: "dnn/batch_normalization_2/AssignMovingAvg:0"
+ value: "dnn/batch_normalization_2/AssignMovingAvg_1:0"
+ value: "dnn/batch_normalization_3/AssignMovingAvg:0"
+ value: "dnn/batch_normalization_3/AssignMovingAvg_1:0"
+ }
+ }
+ }
+ collection_def {
+ key: "variables"
+ value {
+ bytes_list {
+ value: "\n\020hidden1/kernel:0\022\025hidden1/kernel/Assign\032\025hidden1/kernel/read:02-hidden1/kernel/Initializer/truncated_normal:0"
+ value: "\n\016hidden1/bias:0\022\023hidden1/bias/Assign\032\023hidden1/bias/read:02 hidden1/bias/Initializer/zeros:0"
+ value: "\n\033batch_normalization/gamma:0\022 batch_normalization/gamma/Assign\032 batch_normalization/gamma/read:02,batch_normalization/gamma/Initializer/ones:0"
+ value: "\n\032batch_normalization/beta:0\022\037batch_normalization/beta/Assign\032\037batch_normalization/beta/read:02,batch_normalization/beta/Initializer/zeros:0"
+ value: "\n!batch_normalization/moving_mean:0\022&batch_normalization/moving_mean/Assign\032&batch_normalization/moving_mean/read:023batch_normalization/moving_mean/Initializer/zeros:0"
+ value: "\n%batch_normalization/moving_variance:0\022*batch_normalization/moving_variance/Assign\032*batch_normalization/moving_variance/read:026batch_normalization/moving_variance/Initializer/ones:0"
+ value: "\n\020hidden2/kernel:0\022\025hidden2/kernel/Assign\032\025hidden2/kernel/read:02-hidden2/kernel/Initializer/truncated_normal:0"
+ value: "\n\016hidden2/bias:0\022\023hidden2/bias/Assign\032\023hidden2/bias/read:02 hidden2/bias/Initializer/zeros:0"
+ value: "\n\035batch_normalization_1/gamma:0\022\"batch_normalization_1/gamma/Assign\032\"batch_normalization_1/gamma/read:02.batch_normalization_1/gamma/Initializer/ones:0"
+ value: "\n\034batch_normalization_1/beta:0\022!batch_normalization_1/beta/Assign\032!batch_normalization_1/beta/read:02.batch_normalization_1/beta/Initializer/zeros:0"
+ value: "\n#batch_normalization_1/moving_mean:0\022(batch_normalization_1/moving_mean/Assign\032(batch_normalization_1/moving_mean/read:025batch_normalization_1/moving_mean/Initializer/zeros:0"
+ value: "\n\'batch_normalization_1/moving_variance:0\022,batch_normalization_1/moving_variance/Assign\032,batch_normalization_1/moving_variance/read:028batch_normalization_1/moving_variance/Initializer/ones:0"
+ value: "\n\020outputs/kernel:0\022\025outputs/kernel/Assign\032\025outputs/kernel/read:02-outputs/kernel/Initializer/truncated_normal:0"
+ value: "\n\016outputs/bias:0\022\023outputs/bias/Assign\032\023outputs/bias/read:02 outputs/bias/Initializer/zeros:0"
+ value: "\n\035batch_normalization_2/gamma:0\022\"batch_normalization_2/gamma/Assign\032\"batch_normalization_2/gamma/read:02.batch_normalization_2/gamma/Initializer/ones:0"
+ value: "\n\034batch_normalization_2/beta:0\022!batch_normalization_2/beta/Assign\032!batch_normalization_2/beta/read:02.batch_normalization_2/beta/Initializer/zeros:0"
+ value: "\n#batch_normalization_2/moving_mean:0\022(batch_normalization_2/moving_mean/Assign\032(batch_normalization_2/moving_mean/read:025batch_normalization_2/moving_mean/Initializer/zeros:0"
+ value: "\n\'batch_normalization_2/moving_variance:0\022,batch_normalization_2/moving_variance/Assign\032,batch_normalization_2/moving_variance/read:028batch_normalization_2/moving_variance/Initializer/ones:0"
+ }
+ }
+ }
+ signature_def {
+ key: "serving_default"
+ value {
+ inputs {
+ key: "x"
+ value {
+ name: "X:0"
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 784
+ }
+ }
+ }
+ }
+ outputs {
+ key: "y"
+ value {
+ name: "dnn/batch_normalization_3/batchnorm/add_1:0"
+ dtype: DT_FLOAT
+ tensor_shape {
+ dim {
+ size: -1
+ }
+ dim {
+ size: 10
+ }
+ }
+ }
+ }
+ method_name: "tensorflow/serving/predict"
+ }
+ }
+}
diff --git a/searchlib/src/test/files/integration/tensorflow/batch_norm/saved/variables/variables.data-00000-of-00001 b/searchlib/src/test/files/integration/tensorflow/batch_norm/saved/variables/variables.data-00000-of-00001
new file mode 100644
index 00000000000..875e8361e10
--- /dev/null
+++ b/searchlib/src/test/files/integration/tensorflow/batch_norm/saved/variables/variables.data-00000-of-00001
Binary files differ
diff --git a/searchlib/src/test/files/integration/tensorflow/batch_norm/saved/variables/variables.index b/searchlib/src/test/files/integration/tensorflow/batch_norm/saved/variables/variables.index
new file mode 100644
index 00000000000..46c7b258cf5
--- /dev/null
+++ b/searchlib/src/test/files/integration/tensorflow/batch_norm/saved/variables/variables.index
Binary files differ
diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorflowImportTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorflowImportTestCase.java
index 3ec074dc653..13d042ee5dd 100644
--- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorflowImportTestCase.java
+++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorflowImportTestCase.java
@@ -60,10 +60,7 @@ public class TensorflowImportTestCase {
RankingExpression output = signature.outputExpression("y");
assertNotNull(output);
assertEquals("add", output.getName());
- assertEquals("" +
- "join(rename(matmul(Placeholder, rename(constant(Variable), (d0, d1), (d1, d3)), d1), d3, d1), " +
- "rename(constant(Variable_1), d0, d1), " +
- "f(a,b)(a + b))",
+ assertEquals("join(rename(reduce(join(Placeholder, rename(constant(\"Variable\"), (d0, d1), (d1, d3)), f(a,b)(a * b)), sum, d1), d3, d1), rename(constant(\"Variable_1\"), d0, d1), f(a,b)(a + b))",
toNonPrimitiveString(output));
// Test execution
@@ -74,195 +71,28 @@ public class TensorflowImportTestCase {
}
@Test
- public void test3LayerMnistImport() {
- String modelDir = "src/test/files/integration/tensorflow/3_layer_mnist/saved";
+ public void testBatchNormImport() {
+ String modelDir = "src/test/files/integration/tensorflow/batch_norm/saved";
SavedModelBundle model = SavedModelBundle.load(modelDir, "serve");
TensorFlowModel result = new TensorFlowImporter().importModel(model);
+ TensorFlowModel.Signature signature = result.signature("serving_default");
- // Check constants
- assertEquals(8, result.constants().size());
-
- Tensor outputBias = result.constants().get("dnn/outputs/bias");
- assertNotNull(outputBias);
- assertEquals(new TensorType.Builder().indexed("d0", 10).build(), outputBias.type());
- assertEquals(10, outputBias.size());
-
- Tensor outputWeights = result.constants().get("dnn/outputs/weights");
- assertNotNull(outputWeights);
- assertEquals(new TensorType.Builder().indexed("d0", 40).indexed("d1", 10).build(), outputWeights.type());
- assertEquals(400, outputWeights.size());
-
- Tensor hidden3Bias = result.constants().get("dnn/hidden3/bias");
- assertNotNull(hidden3Bias);
- assertEquals(new TensorType.Builder().indexed("d0", 40).build(), hidden3Bias.type());
- assertEquals(40, hidden3Bias.size());
-
- Tensor hidden3Weights = result.constants().get("dnn/hidden3/weights");
- assertNotNull(hidden3Weights);
- assertEquals(new TensorType.Builder().indexed("d0", 100).indexed("d1", 40).build(), hidden3Weights.type());
- assertEquals(4000, hidden3Weights.size());
-
- Tensor hidden2Bias = result.constants().get("dnn/hidden2/bias");
- assertNotNull(hidden2Bias);
- assertEquals(new TensorType.Builder().indexed("d0", 100).build(), hidden2Bias.type());
- assertEquals(100, hidden2Bias.size());
-
- Tensor hidden2Weights = result.constants().get("dnn/hidden2/weights");
- assertNotNull(hidden2Weights);
- assertEquals(new TensorType.Builder().indexed("d0", 300).indexed("d1", 100).build(), hidden2Weights.type());
- assertEquals(30000, hidden2Weights.size());
+ assertEquals("Has skipped outputs", 0, result.signature("serving_default").skippedOutputs().size());
- Tensor hidden1Bias = result.constants().get("dnn/hidden1/bias");
- assertNotNull(hidden1Bias);
- assertEquals(new TensorType.Builder().indexed("d0", 300).build(), hidden1Bias.type());
- assertEquals(300, hidden1Bias.size());
-
- Tensor hidden1Weights = result.constants().get("dnn/hidden1/weights");
- assertNotNull(hidden1Weights);
- assertEquals(new TensorType.Builder().indexed("d0", 784).indexed("d1", 300).build(), hidden1Weights.type());
- assertEquals(235200, hidden1Weights.size());
-
- // Check signatures
- assertEquals(1, result.signatures().size());
- TensorFlowModel.Signature signature = result.signatures().get("serving_default");
- assertNotNull(signature);
-
- // ... signature inputs
- assertEquals(1, signature.inputs().size());
- TensorType argument0 = signature.inputArgument("x");
- assertNotNull(argument0);
- assertEquals(new TensorType.Builder().indexed("d0").indexed("d1", 784).build(), argument0);
-
- // ... signature outputs
- assertEquals(1, signature.outputs().size());
RankingExpression output = signature.outputExpression("y");
assertNotNull(output);
- assertEquals("dnn/outputs/add", output.getName());
- assertEquals("" +
- "join(" +
- "rename(" +
- "matmul(" +
- "map(" +
- "join(" +
- "rename(" +
- "matmul(" +
- "map(" +
- "join(" +
- "rename(" +
- "matmul(" +
- "map(" +
- "join(" +
- "rename(" +
- "matmul(" +
- "X, " +
- "rename(" +
- "constant(dnn/hidden1/weights), " +
- "(d0, d1), " +
- "(d1, d3)" +
- "), " +
- "d1" +
- "), " +
- "d3, " +
- "d1" +
- "), " +
- "rename(" +
- "constant(dnn/hidden1/bias), " +
- "d0, " +
- "d1" +
- "), " +
- "f(a,b)(a + b)" +
- "), " +
- "f(a)(if(a < 0, exp(a)-1, a))" +
- "), " +
- "rename(" +
- "constant(dnn/hidden2/weights), " +
- "(d0, d1), " +
- "(d1, d3)" +
- "), " +
- "d1" +
- "), " +
- "d3, " +
- "d1" +
- "), " +
- "rename(" +
- "constant(dnn/hidden2/bias), " +
- "d0, " +
- "d1" +
- "), " +
- "f(a,b)(a + b)" +
- "), " +
- "f(a)(max(0, a))" +
- "), " +
- "rename(" +
- "constant(dnn/hidden3/weights), " +
- "(d0, d1), " +
- "(d1, d3)" +
- "), " +
- "d1" +
- "), " +
- "d3, " +
- "d1" +
- "), " +
- "rename(" +
- "constant(dnn/hidden3/bias), " +
- "d0, " +
- "d1" +
- "), " +
- "f(a,b)(a + b)" +
- "), " +
- "f(a)(1 / (1 + exp(-a)))" +
- "), " +
- "rename(" +
- "constant(dnn/outputs/weights), " +
- "(d0, d1), " +
- "(d1, d3)" +
- "), " +
- "d1" +
- "), " +
- "d3, " +
- "d1" +
- "), " +
- "rename(" +
- "constant(dnn/outputs/bias), " +
- "d0, " +
- "d1" +
- "), " +
- "f(a,b)(a + b)" +
- ")",
- toNonPrimitiveString(output));
+ assertEquals("dnn/batch_normalization_3/batchnorm/add_1", output.getName());
+ assertEqualResult(model, result, "X", output.getName());
- // Test constants
- assertEqualResult(model, result, "X", "dnn/hidden1/weights/read");
- assertEqualResult(model, result, "X", "dnn/hidden1/bias/read");
- assertEqualResult(model, result, "X", "dnn/hidden2/weights/read");
- assertEqualResult(model, result, "X", "dnn/hidden2/bias/read");
- assertEqualResult(model, result, "X", "dnn/hidden3/weights/read");
- assertEqualResult(model, result, "X", "dnn/hidden3/bias/read");
- assertEqualResult(model, result, "X", "dnn/outputs/weights/read");
- assertEqualResult(model, result, "X", "dnn/outputs/bias/read");
-
- // Test execution
- assertEqualResult(model, result, "X", "dnn/hidden1/MatMul");
- assertEqualResult(model, result, "X", "dnn/hidden1/add");
- assertEqualResult(model, result, "X", "dnn/hidden1/Elu");
- assertEqualResult(model, result, "X", "dnn/hidden2/MatMul");
- assertEqualResult(model, result, "X", "dnn/hidden2/add");
- assertEqualResult(model, result, "X", "dnn/hidden2/Relu");
- assertEqualResult(model, result, "X", "dnn/hidden3/MatMul");
- assertEqualResult(model, result, "X", "dnn/hidden3/add");
- assertEqualResult(model, result, "X", "dnn/hidden3/Sigmoid");
- assertEqualResult(model, result, "X", "dnn/outputs/MatMul");
- assertEqualResult(model, result, "X", "dnn/outputs/add");
}
-
private void assertEqualResult(SavedModelBundle model, TensorFlowModel result, String inputName, String operationName) {
Tensor tfResult = tensorFlowExecute(model, inputName, operationName);
Context context = contextFrom(result);
Tensor placeholder = placeholderArgument();
context.put(inputName, new TensorValue(placeholder));
Tensor vespaResult = result.expressions().get(operationName).evaluate(context).asTensor();
- assertEquals("Operation '" + operationName + "' produces equal results", vespaResult, tfResult);
+ assertEquals("Operation '" + operationName + "' produces equal results", tfResult, vespaResult);
}
private Tensor tensorFlowExecute(SavedModelBundle model, String inputName, String operationName) {
@@ -276,7 +106,7 @@ public class TensorflowImportTestCase {
private Context contextFrom(TensorFlowModel result) {
MapContext context = new MapContext();
- result.constants().forEach((name, tensor) -> context.put("constant(" + name + ")", new TensorValue(tensor)));
+ result.constants().forEach((name, tensor) -> context.put("constant(\"" + name + "\")", new TensorValue(tensor)));
return context;
}
diff --git a/searchlib/src/tests/attribute/attribute_test.cpp b/searchlib/src/tests/attribute/attribute_test.cpp
index b406afa7e7b..9134711773c 100644
--- a/searchlib/src/tests/attribute/attribute_test.cpp
+++ b/searchlib/src/tests/attribute/attribute_test.cpp
@@ -1955,27 +1955,27 @@ AttributeTest::testGeneration()
{
{ // single value attribute
Config cfg(BasicType::INT8);
- cfg.setGrowStrategy(GrowStrategy(2, 0, 2));
+ cfg.setGrowStrategy(GrowStrategy::make(2, 0, 2));
AttributePtr attr = createAttribute("int8", cfg);
testGeneration(attr, true);
}
{ // enum attribute (with fast search)
Config cfg(BasicType::INT8);
cfg.setFastSearch(true);
- cfg.setGrowStrategy(GrowStrategy(2, 0, 2));
+ cfg.setGrowStrategy(GrowStrategy::make(2, 0, 2));
AttributePtr attr = createAttribute("faint8", cfg);
testGeneration(attr, false);
}
{ // multi value attribute
Config cfg(BasicType::INT8, CollectionType::ARRAY);
- cfg.setGrowStrategy(GrowStrategy(2, 0, 2));
+ cfg.setGrowStrategy(GrowStrategy::make(2, 0, 2));
AttributePtr attr = createAttribute("aint8", cfg);
testGeneration(attr, false);
}
{ // multi value enum attribute (with fast search)
Config cfg(BasicType::INT8, CollectionType::ARRAY);
cfg.setFastSearch(true);
- cfg.setGrowStrategy(GrowStrategy(2, 0, 2));
+ cfg.setGrowStrategy(GrowStrategy::make(2, 0, 2));
AttributePtr attr = createAttribute("faaint8", cfg);
testGeneration(attr, false);
}
@@ -2245,7 +2245,7 @@ AttributeTest::testReaderDuringLastUpdate(const Config &config, bool fs, bool co
vespalib::string name(ss.str());
Config cfg = config;
cfg.setFastSearch(fs);
- cfg.setGrowStrategy(GrowStrategy(100, 50, 0));
+ cfg.setGrowStrategy(GrowStrategy::make(100, 50, 0));
LOG(info, "testReaderDuringLastUpdate(%s)", name.c_str());
AttributePtr attr = AttributeFactory::createAttribute(name, cfg);
diff --git a/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp b/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp
index 6406ce6d4a1..114d0492c1a 100644
--- a/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp
+++ b/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp
@@ -3,6 +3,20 @@
#include <vespa/searchlib/test/imported_attribute_fixture.h>
#include <vespa/searchlib/fef/termfieldmatchdata.h>
#include <vespa/searchcommon/attribute/search_context_params.h>
+#include <vespa/searchlib/tensor/i_tensor_attribute.h>
+#include <vespa/searchlib/tensor/tensor_attribute.h>
+#include <vespa/eval/tensor/tensor_factory.h>
+#include <vespa/eval/tensor/tensor.h>
+#include <vespa/eval/tensor/default_tensor.h>
+
+using vespalib::eval::ValueType;
+using vespalib::tensor::Tensor;
+using vespalib::tensor::TensorCells;
+using vespalib::tensor::DenseTensorCells;
+using vespalib::tensor::TensorDimensions;
+using vespalib::tensor::TensorFactory;
+using search::tensor::TensorAttribute;
+using search::tensor::ITensorAttribute;
namespace search {
namespace attribute {
@@ -534,6 +548,90 @@ TEST("onSerializeForDescendingSort() is forwarded with remapped LID to target ve
SerializeFixture<ReadGuardSingleStringAttrFixture>>());
}
+template <bool useReadGuard = false>
+struct TensorAttrFixtureBase : FixtureBase<useReadGuard> {
+ vespalib::tensor::DefaultTensor::builder builder;
+ std::shared_ptr<Tensor> tensor1;
+ std::shared_ptr<Tensor> tensor2;
+
+ TensorAttrFixtureBase(bool dense)
+ : FixtureBase<useReadGuard>(),
+ builder(),
+ tensor1(),
+ tensor2()
+ {
+ setup(dense);
+ }
+ Tensor::UP createTensor(const TensorCells &cells,
+ const TensorDimensions &dimensions) {
+ return TensorFactory::create(cells, dimensions, builder);
+ }
+ Tensor::UP createDenseTensor(const DenseTensorCells &cells) const {
+ return TensorFactory::createDense(cells);
+ }
+ void setup(bool dense) {
+ if (dense) {
+ tensor1 = createDenseTensor({ {{{"x",1}}, 11} });
+ tensor2 = createDenseTensor({ {{{"x",0}}, 12}, {{{"x", 1}}, 0} });
+ } else {
+ tensor1 = createTensor({ {{{"x","1"}}, 11} }, { "x" });
+ tensor2 = createTensor({ {{{"x","0"}}, 12} }, { "x" });
+ }
+ const std::vector<ImportedAttributeFixture::LidToLidMapping<std::shared_ptr<Tensor>>> mappings =
+ { {DocId(2), dummy_gid(3), DocId(3), tensor1 },
+ {DocId(4), dummy_gid(7), DocId(7), tensor2 } };
+ this->template reset_with_tensor_reference_mappings<TensorAttribute, std::shared_ptr<Tensor>>(
+ ValueType::from_spec(dense ? "tensor(x[2])" : "tensor(x{})"),
+ mappings);
+ }
+ Tensor::UP getTensor(DocId docId) {
+ auto imp_attr = this->get_imported_attr();
+ const ITensorAttribute & tensorAttr = dynamic_cast<const ITensorAttribute &>(*imp_attr);
+ return tensorAttr.getTensor(docId);
+ }
+ void assertNoTensor(DocId docId) {
+ auto tensor = getTensor(docId);
+ EXPECT_TRUE(!tensor);
+ }
+ void assertTensor(DocId docId, const Tensor &expTensor) {
+ auto tensor = getTensor(docId);
+ ASSERT_TRUE(!!tensor);
+ EXPECT_EQUAL(expTensor, *tensor);
+ }
+ void assertTensors() {
+ assertNoTensor(0);
+ assertNoTensor(1);
+ assertTensor(2, *tensor1);
+ assertNoTensor(3);
+ assertTensor(4, *tensor2);
+ }
+};
+
+using TensorAttrFixture = TensorAttrFixtureBase<false>;
+using ReadGuardTensorAttrFixture = TensorAttrFixtureBase<true>;
+
+
+
+TEST_F("Imported sparse tensor", TensorAttrFixture(false))
+{
+ f.assertTensors();
+}
+
+TEST_F("Imported dense tensor", TensorAttrFixture(true))
+{
+ f.assertTensors();
+}
+
+TEST_F("Imported sparse tensor read guard", ReadGuardTensorAttrFixture(false))
+{
+ f.assertTensors();
+}
+
+TEST_F("Imported dense tensor read guard", ReadGuardTensorAttrFixture(true))
+{
+ f.assertTensors();
+}
+
} // attribute
} // search
diff --git a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
index 33d5d648feb..c1413d5244e 100644
--- a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
+++ b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
@@ -59,6 +59,8 @@ public:
}
};
+constexpr float ALLOC_GROW_FACTOR = 0.2;
+
template <typename EntryT>
class Fixture
{
@@ -72,12 +74,16 @@ protected:
public:
using ConstArrayRef = vespalib::ConstArrayRef<EntryT>;
Fixture(uint32_t maxSmallArraySize)
- : _mvMapping(ArrayStoreConfig(maxSmallArraySize, ArrayStoreConfig::AllocSpec(0, RefType::offsetSize(), 8 * 1024))),
+ : _mvMapping(ArrayStoreConfig(maxSmallArraySize,
+ ArrayStoreConfig::AllocSpec(0, RefType::offsetSize(), 8 * 1024,
+ ALLOC_GROW_FACTOR))),
_attr(_mvMapping)
{
}
Fixture(uint32_t maxSmallArraySize, size_t minClusters, size_t maxClusters, size_t numClustersForNewBuffer)
- : _mvMapping(ArrayStoreConfig(maxSmallArraySize, ArrayStoreConfig::AllocSpec(minClusters, maxClusters, numClustersForNewBuffer))),
+ : _mvMapping(ArrayStoreConfig(maxSmallArraySize,
+ ArrayStoreConfig::AllocSpec(minClusters, maxClusters, numClustersForNewBuffer,
+ ALLOC_GROW_FACTOR))),
_attr(_mvMapping)
{
}
diff --git a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
index 9829ff27104..cbc86b02ada 100644
--- a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
+++ b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
@@ -1622,7 +1622,7 @@ SearchContextTest::requireThatFlagAttributeIsWorkingWhenNewDocsAreAdded()
Config cfg(BasicType::INT8, CollectionType::ARRAY);
cfg.setFastSearch(true);
{
- cfg.setGrowStrategy(GrowStrategy(1, 0, 1));
+ cfg.setGrowStrategy(GrowStrategy::make(1, 0, 1));
AttributePtr a = AttributeFactory::createAttribute("flags", cfg);
FlagAttribute & fa = dynamic_cast<FlagAttribute &>(*a);
addReservedDoc(fa);
@@ -1657,7 +1657,7 @@ SearchContextTest::requireThatFlagAttributeIsWorkingWhenNewDocsAreAdded()
}
}
{
- cfg.setGrowStrategy(GrowStrategy(4, 0, 4));
+ cfg.setGrowStrategy(GrowStrategy::make(4, 0, 4));
AttributePtr a = AttributeFactory::createAttribute("flags", cfg);
FlagAttribute & fa = dynamic_cast<FlagAttribute &>(*a);
std::vector<uint32_t> exp50;
diff --git a/searchlib/src/tests/datastore/array_store/array_store_test.cpp b/searchlib/src/tests/datastore/array_store/array_store_test.cpp
index 08559ed213f..fff4445890b 100644
--- a/searchlib/src/tests/datastore/array_store/array_store_test.cpp
+++ b/searchlib/src/tests/datastore/array_store/array_store_test.cpp
@@ -13,6 +13,8 @@ using vespalib::ArrayRef;
using generation_t = vespalib::GenerationHandler::generation_t;
using MemStats = search::datastore::test::MemStats;
+constexpr float ALLOC_GROW_FACTOR = 0.2;
+
template <typename EntryT, typename RefT = EntryRefT<19> >
struct Fixture
{
@@ -28,7 +30,9 @@ struct Fixture
ReferenceStore refStore;
generation_t generation;
Fixture(uint32_t maxSmallArraySize)
- : store(ArrayStoreConfig(maxSmallArraySize, ArrayStoreConfig::AllocSpec(16, RefT::offsetSize(), 8 * 1024))),
+ : store(ArrayStoreConfig(maxSmallArraySize,
+ ArrayStoreConfig::AllocSpec(16, RefT::offsetSize(), 8 * 1024,
+ ALLOC_GROW_FACTOR))),
refStore(),
generation(1)
{}
diff --git a/searchlib/src/tests/datastore/array_store_config/array_store_config_test.cpp b/searchlib/src/tests/datastore/array_store_config/array_store_config_test.cpp
index d9fe6f353bf..e0f93761b13 100644
--- a/searchlib/src/tests/datastore/array_store_config/array_store_config_test.cpp
+++ b/searchlib/src/tests/datastore/array_store_config/array_store_config_test.cpp
@@ -7,6 +7,8 @@
using namespace search::datastore;
using AllocSpec = ArrayStoreConfig::AllocSpec;
+constexpr float ALLOC_GROW_FACTOR = 0.2;
+
struct Fixture
{
using EntryRefType = EntryRefT<18>;
@@ -22,28 +24,39 @@ struct Fixture
size_t minNumArraysForNewBuffer)
: cfg(ArrayStoreConfig::optimizeForHugePage(maxSmallArraySize, hugePageSize, smallPageSize,
sizeof(int), EntryRefType::offsetSize(),
- minNumArraysForNewBuffer)) { }
+ minNumArraysForNewBuffer,
+ ALLOC_GROW_FACTOR)) { }
void assertSpec(size_t arraySize, uint32_t numArraysForNewBuffer) {
- assertSpec(arraySize, AllocSpec(0, EntryRefType::offsetSize(), numArraysForNewBuffer));
+ assertSpec(arraySize, AllocSpec(0, EntryRefType::offsetSize(),
+ numArraysForNewBuffer, ALLOC_GROW_FACTOR));
}
void assertSpec(size_t arraySize, const AllocSpec &expSpec) {
const ArrayStoreConfig::AllocSpec &actSpec = cfg.specForSize(arraySize);
EXPECT_EQUAL(expSpec.minArraysInBuffer, actSpec.minArraysInBuffer);
EXPECT_EQUAL(expSpec.maxArraysInBuffer, actSpec.maxArraysInBuffer);
EXPECT_EQUAL(expSpec.numArraysForNewBuffer, actSpec.numArraysForNewBuffer);
+ EXPECT_EQUAL(expSpec.allocGrowFactor, actSpec.allocGrowFactor);
}
};
+AllocSpec
+makeSpec(size_t minArraysInBuffer,
+ size_t maxArraysInBuffer,
+ size_t numArraysForNewBuffer)
+{
+ return AllocSpec(minArraysInBuffer, maxArraysInBuffer, numArraysForNewBuffer, ALLOC_GROW_FACTOR);
+}
+
constexpr size_t KB = 1024;
constexpr size_t MB = KB * KB;
-TEST_F("require that default allocation spec is given for all array sizes", Fixture(3, AllocSpec(4, 32, 8)))
+TEST_F("require that default allocation spec is given for all array sizes", Fixture(3, makeSpec(4, 32, 8)))
{
EXPECT_EQUAL(3u, f.cfg.maxSmallArraySize());
- TEST_DO(f.assertSpec(0, AllocSpec(4, 32, 8)));
- TEST_DO(f.assertSpec(1, AllocSpec(4, 32, 8)));
- TEST_DO(f.assertSpec(2, AllocSpec(4, 32, 8)));
- TEST_DO(f.assertSpec(3, AllocSpec(4, 32, 8)));
+ TEST_DO(f.assertSpec(0, makeSpec(4, 32, 8)));
+ TEST_DO(f.assertSpec(1, makeSpec(4, 32, 8)));
+ TEST_DO(f.assertSpec(2, makeSpec(4, 32, 8)));
+ TEST_DO(f.assertSpec(3, makeSpec(4, 32, 8)));
}
TEST_F("require that we can generate config optimized for a given huge page", Fixture(1024,
diff --git a/searchlib/src/tests/datastore/buffer_type/CMakeLists.txt b/searchlib/src/tests/datastore/buffer_type/CMakeLists.txt
new file mode 100644
index 00000000000..3c3a6eb6f87
--- /dev/null
+++ b/searchlib/src/tests/datastore/buffer_type/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+vespa_add_executable(searchlib_buffer_type_test_app TEST
+ SOURCES
+ buffer_type_test.cpp
+ DEPENDS
+ searchlib
+)
+vespa_add_test(NAME searchlib_buffer_type_test_app COMMAND searchlib_buffer_type_test_app)
diff --git a/searchlib/src/tests/datastore/buffer_type/FILES b/searchlib/src/tests/datastore/buffer_type/FILES
new file mode 100644
index 00000000000..741fd68ebba
--- /dev/null
+++ b/searchlib/src/tests/datastore/buffer_type/FILES
@@ -0,0 +1 @@
+buffer_type_test.cpp
diff --git a/searchlib/src/tests/datastore/buffer_type/buffer_type_test.cpp b/searchlib/src/tests/datastore/buffer_type/buffer_type_test.cpp
new file mode 100644
index 00000000000..1477a7281e6
--- /dev/null
+++ b/searchlib/src/tests/datastore/buffer_type/buffer_type_test.cpp
@@ -0,0 +1,116 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include <vespa/searchlib/datastore/buffer_type.h>
+#include <vespa/vespalib/testkit/testapp.h>
+
+using namespace search::datastore;
+
+using IntBufferType = BufferType<int>;
+constexpr uint32_t CLUSTER_SIZE(4);
+constexpr uint32_t MAX_CLUSTERS(128);
+constexpr uint32_t NUM_CLUSTERS_FOR_NEW_BUFFER(0);
+
+struct Setup {
+ uint32_t _minClusters;
+ size_t _usedElems;
+ size_t _neededElems;
+ uint32_t _bufferId;
+ float _allocGrowFactor;
+ bool _resizing;
+ Setup()
+ : _minClusters(0),
+ _usedElems(0),
+ _neededElems(0),
+ _bufferId(1),
+ _allocGrowFactor(0.5),
+ _resizing(false)
+ {}
+ Setup &minClusters(uint32_t value) { _minClusters = value; return *this; }
+ Setup &used(size_t value) { _usedElems = value; return *this; }
+ Setup &needed(size_t value) { _neededElems = value; return *this; }
+ Setup &bufferId(uint32_t value) { _bufferId = value; return *this; }
+ Setup &resizing(bool value) { _resizing = value; return *this; }
+};
+
+struct Fixture {
+ Setup setup;
+ IntBufferType bufferType;
+ size_t deadElems;
+ int buffer;
+ Fixture(const Setup &setup_)
+ : setup(setup_),
+ bufferType(CLUSTER_SIZE, setup._minClusters, MAX_CLUSTERS, NUM_CLUSTERS_FOR_NEW_BUFFER, setup._allocGrowFactor),
+ deadElems(0),
+ buffer(0)
+ {}
+ ~Fixture() {
+ bufferType.onHold(&setup._usedElems);
+ bufferType.onFree(setup._usedElems);
+ }
+ void onActive() {
+ bufferType.onActive(setup._bufferId, &setup._usedElems, deadElems, &buffer);
+ }
+ size_t clustersToAlloc() {
+ return bufferType.calcClustersToAlloc(setup._bufferId, setup._neededElems, setup._resizing);
+ }
+};
+
+void
+assertClustersToAlloc(size_t exp, const Setup &setup)
+{
+ Fixture f(setup);
+ f.onActive();
+ EXPECT_EQUAL(exp, f.clustersToAlloc());
+}
+
+TEST("require that complete clusters are allocated")
+{
+ TEST_DO(assertClustersToAlloc(1, Setup().needed(1)));
+ TEST_DO(assertClustersToAlloc(1, Setup().needed(2)));
+ TEST_DO(assertClustersToAlloc(1, Setup().needed(3)));
+ TEST_DO(assertClustersToAlloc(1, Setup().needed(4)));
+ TEST_DO(assertClustersToAlloc(2, Setup().needed(5)));
+}
+
+TEST("require that reserved elements are taken into account when not resizing")
+{
+ TEST_DO(assertClustersToAlloc(2, Setup().needed(1).bufferId(0)));
+ TEST_DO(assertClustersToAlloc(2, Setup().needed(4).bufferId(0)));
+ TEST_DO(assertClustersToAlloc(3, Setup().needed(5).bufferId(0)));
+}
+
+TEST("require that clusters to alloc is based on currently used elements (no resizing)")
+{
+ TEST_DO(assertClustersToAlloc(2, Setup().used(4 * 4).needed(4)));
+ TEST_DO(assertClustersToAlloc(4, Setup().used(8 * 4).needed(4)));
+}
+
+TEST("require that clusters to alloc is based on currently used elements (with resizing)")
+{
+ TEST_DO(assertClustersToAlloc(4 + 2, Setup().used(4 * 4).needed(4).resizing(true)));
+ TEST_DO(assertClustersToAlloc(8 + 4, Setup().used(8 * 4).needed(4).resizing(true)));
+ TEST_DO(assertClustersToAlloc(4 + 3, Setup().used(4 * 4).needed(3 * 4).resizing(true)));
+}
+
+TEST("require that clusters to alloc always contain elements needed")
+{
+ TEST_DO(assertClustersToAlloc(2, Setup().used(4 * 4).needed(2 * 4)));
+ TEST_DO(assertClustersToAlloc(3, Setup().used(4 * 4).needed(3 * 4)));
+ TEST_DO(assertClustersToAlloc(4, Setup().used(4 * 4).needed(4 * 4)));
+}
+
+TEST("require that clusters to alloc is capped to max clusters")
+{
+ TEST_DO(assertClustersToAlloc(127, Setup().used(254 * 4).needed(4)));
+ TEST_DO(assertClustersToAlloc(128, Setup().used(256 * 4).needed(4)));
+ TEST_DO(assertClustersToAlloc(128, Setup().used(258 * 4).needed(8)));
+}
+
+TEST("require that clusters to alloc is capped to min clusters")
+{
+ TEST_DO(assertClustersToAlloc(16, Setup().used(30 * 4).needed(4).minClusters(16)));
+ TEST_DO(assertClustersToAlloc(16, Setup().used(32 * 4).needed(4).minClusters(16)));
+ TEST_DO(assertClustersToAlloc(17, Setup().used(34 * 4).needed(4).minClusters(16)));
+}
+
+TEST_MAIN() { TEST_RUN_ALL(); }
diff --git a/searchlib/src/tests/datastore/datastore/datastore_test.cpp b/searchlib/src/tests/datastore/datastore/datastore_test.cpp
index 7599f675b58..2463439c47c 100644
--- a/searchlib/src/tests/datastore/datastore/datastore_test.cpp
+++ b/searchlib/src/tests/datastore/datastore/datastore_test.cpp
@@ -65,6 +65,8 @@ public:
using GrowthStats = std::vector<int>;
+constexpr float ALLOC_GROW_FACTOR = 0.5;
+
class GrowStore
{
using Store = DataStoreT<EntryRefT<22>>;
@@ -76,8 +78,8 @@ class GrowStore
public:
GrowStore(size_t minSize, size_t minSwitch)
: _store(),
- _firstType(1, 1, 64, 0),
- _type(1, minSize, 64, minSwitch),
+ _firstType(1, 1, 64, 0, ALLOC_GROW_FACTOR),
+ _type(1, minSize, 64, minSwitch, ALLOC_GROW_FACTOR),
_typeId(0)
{
(void) _store.addType(&_firstType);
@@ -90,16 +92,16 @@ public:
GrowthStats sizes;
int i = 0;
int previ = 0;
- int prevBuffer = -1;
+ int prevBufferId = -1;
while (sizes.size() < bufs) {
RefType iRef(_store.allocator<int>(_typeId).alloc().ref);
- int buffer = iRef.bufferId();
- if (buffer != prevBuffer) {
- if (prevBuffer >= 0) {
+ int bufferId = iRef.bufferId();
+ if (bufferId != prevBufferId) {
+ if (prevBufferId >= 0) {
sizes.push_back(i - previ);
previ = i;
}
- prevBuffer = buffer;
+ prevBufferId = bufferId;
}
++i;
}
@@ -460,7 +462,7 @@ void assertGrowStats(GrowthStats expSizes,
size_t expInitMemUsage,
size_t minSize, size_t minSwitch)
{
- EXPECT_EQUAL(expSizes, GrowStore(minSize, minSwitch).getGrowthStats(9));
+ EXPECT_EQUAL(expSizes, GrowStore(minSize, minSwitch).getGrowthStats(expSizes.size()));
EXPECT_EQUAL(expFirstBufSizes, GrowStore(minSize, minSwitch).getFirstBufGrowStats());
EXPECT_EQUAL(expInitMemUsage, GrowStore(minSize, minSwitch).getMemoryUsage().allocatedBytes());
}
@@ -470,22 +472,22 @@ void assertGrowStats(GrowthStats expSizes,
TEST("require that buffer growth works")
{
// Always switch to new buffer, min size 4
- TEST_DO(assertGrowStats({ 4, 8, 16, 32, 64, 64, 64, 64, 64 },
+ TEST_DO(assertGrowStats({ 4, 4, 4, 6, 9, 13, 20, 30, 45, 64 },
{ 4 }, 20, 4, 0));
// Resize if buffer size is less than 4, min size 0
- TEST_DO(assertGrowStats({ 4, 8, 16, 32, 64, 64, 64, 64, 64 },
- { 0, 1, 2, 4 }, 4, 0, 4));
+ TEST_DO(assertGrowStats({ 3, 3, 3, 4, 6, 9, 14, 21, 31, 47 },
+ { 0, 1, 2, 3 }, 4, 0, 4));
// Always switch to new buffer, min size 16
- TEST_DO(assertGrowStats({ 16, 32, 64, 64, 64, 64, 64, 64, 64 },
+ TEST_DO(assertGrowStats({ 16, 16, 16, 24, 36, 54, 64, 64, 64 },
{ 16 }, 68, 16, 0));
// Resize if buffer size is less than 16, min size 0
- TEST_DO(assertGrowStats({ 16, 32, 64, 64, 64, 64, 64, 64, 64 },
- { 0, 1, 2, 4, 8, 16 }, 4, 0, 16));
+ TEST_DO(assertGrowStats({ 19, 19, 19, 28, 42, 63, 64, 64, 64 },
+ { 0, 1, 2, 3, 4, 6, 9, 13, 19 }, 4, 0, 16));
// Resize if buffer size is less than 16, min size 4
- TEST_DO(assertGrowStats({ 16, 32, 64, 64, 64, 64, 64, 64, 64 },
- { 4, 8, 16 }, 20, 4, 16));
+ TEST_DO(assertGrowStats({ 19, 19, 19, 28, 42, 63, 64, 64, 64 },
+ { 4, 6, 9, 13, 19 }, 20, 4, 16));
// Always switch to new buffer, min size 0
- TEST_DO(assertGrowStats({ 1, 1, 2, 4, 8, 16, 32, 64, 64},
+ TEST_DO(assertGrowStats({ 1, 1, 1, 1, 2, 3, 4, 6, 9 },
{ 0, 1 }, 4, 0, 0));
}
diff --git a/searchlib/src/tests/memoryindex/datastore/wordstore_test.cpp b/searchlib/src/tests/memoryindex/datastore/wordstore_test.cpp
index 6c4c7801038..c1baff72514 100644
--- a/searchlib/src/tests/memoryindex/datastore/wordstore_test.cpp
+++ b/searchlib/src/tests/memoryindex/datastore/wordstore_test.cpp
@@ -49,15 +49,7 @@ Test::requireThatAddWordTriggersChangeOfBuffer()
WordStore ws;
size_t word = 0;
uint32_t lastId = 0;
- size_t lastWord = 0;
char wordStr[10];
- size_t entrySize = WordStore::RefType::align(6 + 1);
- size_t initBufferSpace = 1024u * WordStore::RefType::align(1);
- size_t bufferSpace = initBufferSpace;
- size_t bufferWords = (bufferSpace - WordStore::RefType::align(1)) /
- entrySize;
- size_t usedSpace = 0;
- size_t sumBufferWords = 0;
for (;;++word) {
sprintf(wordStr, "%6zu", word);
// all words uses 12 bytes (include padding)
@@ -68,21 +60,16 @@ Test::requireThatAddWordTriggersChangeOfBuffer()
LOG(info,
"Changed to bufferId %u after %zu words",
bufferId, word);
- EXPECT_EQUAL(bufferWords, word - lastWord);
lastId = bufferId;
- lastWord = word;
- usedSpace += bufferWords * entrySize;
- sumBufferWords += bufferWords;
- bufferSpace = usedSpace + initBufferSpace;
- bufferWords = bufferSpace / entrySize;
}
if (bufferId == 4) {
+ lastId = bufferId;
break;
}
}
- // each buffer can have offsetSize / 12 words
- EXPECT_EQUAL(sumBufferWords, word);
LOG(info, "Added %zu words in 4 buffers", word);
+ EXPECT_EQUAL(2047u, word);
+ EXPECT_EQUAL(4u, lastId);
}
int
diff --git a/searchlib/src/vespa/searchlib/attribute/CMakeLists.txt b/searchlib/src/vespa/searchlib/attribute/CMakeLists.txt
index e99092f0206..cc6736e21c5 100644
--- a/searchlib/src/vespa/searchlib/attribute/CMakeLists.txt
+++ b/searchlib/src/vespa/searchlib/attribute/CMakeLists.txt
@@ -47,6 +47,7 @@ vespa_add_library(searchlib_attribute OBJECT
iattributemanager.cpp
iattributesavetarget.cpp
imported_attribute_vector.cpp
+ imported_attribute_vector_factory.cpp
imported_attribute_vector_read_guard.cpp
imported_search_context.cpp
integerbase.cpp
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h
index 7d272c42d9e..324ce4ec12b 100644
--- a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h
+++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h
@@ -86,7 +86,7 @@ public:
/*
* Create an imported attribute with a snapshot of lid to lid mapping.
*/
- std::unique_ptr<ImportedAttributeVector> makeReadGuard(bool stableEnumGuard) const;
+ virtual std::unique_ptr<ImportedAttributeVector> makeReadGuard(bool stableEnumGuard) const;
protected:
long onSerializeForAscendingSort(DocId doc, void * serTo, long available,
const common::BlobConverter * bc) const override;
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_factory.cpp b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_factory.cpp
new file mode 100644
index 00000000000..8161abe61f4
--- /dev/null
+++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_factory.cpp
@@ -0,0 +1,51 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "imported_attribute_vector_factory.h"
+#include "imported_attribute_vector.h"
+#include <vespa/searchlib/tensor/imported_tensor_attribute_vector.h>
+
+namespace search::attribute {
+
+using search::tensor::ImportedTensorAttributeVector;
+
+namespace {
+
+BasicType::Type getBasicType(const std::shared_ptr<AttributeVector> &attr)
+{
+ return attr ? attr->getBasicType() : BasicType::Type::NONE;
+}
+
+}
+
+std::shared_ptr<ImportedAttributeVector>
+ImportedAttributeVectorFactory::create(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ bool use_search_cache)
+{
+ switch (getBasicType(target_attribute)) {
+ case BasicType::Type::TENSOR:
+ return std::make_shared<ImportedTensorAttributeVector>(name, std::move(reference_attribute), std::move(target_attribute), std::move(document_meta_store), use_search_cache);
+ default:
+ return std::make_shared<ImportedAttributeVector>(name, std::move(reference_attribute), std::move(target_attribute), std::move(document_meta_store), use_search_cache);
+ }
+}
+
+
+std::shared_ptr<ImportedAttributeVector>
+ImportedAttributeVectorFactory::create(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ std::shared_ptr<BitVectorSearchCache> search_cache)
+{
+ switch (getBasicType(target_attribute)) {
+ case BasicType::Type::TENSOR:
+ return std::make_shared<ImportedTensorAttributeVector>(name, std::move(reference_attribute), std::move(target_attribute), std::move(document_meta_store), std::move(search_cache));
+ default:
+ return std::make_shared<ImportedAttributeVector>(name, std::move(reference_attribute), std::move(target_attribute), std::move(document_meta_store), std::move(search_cache));
+ }
+}
+
+} // search::attribute
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_factory.h b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_factory.h
new file mode 100644
index 00000000000..363fb9f29bc
--- /dev/null
+++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_factory.h
@@ -0,0 +1,41 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#pragma once
+
+#include <vespa/vespalib/stllike/string.h>
+#include <memory>
+
+namespace search {
+
+class AttributeVector;
+class IDocumentMetaStoreContext;
+
+namespace attribute {
+
+class BitVectorSearchCache;
+class ImportedAttributeVector;
+class ReferenceAttribute;
+
+/*
+ * Factory class used to create proper imported attribute vector based
+ * on target attribute basic type.
+ */
+class ImportedAttributeVectorFactory {
+public:
+ static std::shared_ptr<ImportedAttributeVector>
+ create(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ bool use_search_cache);
+
+ static std::shared_ptr<ImportedAttributeVector>
+ create(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ std::shared_ptr<BitVectorSearchCache> search_cache);
+};
+
+} // attribute
+} // search
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.h b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.h
index 2ca8680f4b8..a0c24e3b8eb 100644
--- a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.h
+++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector_read_guard.h
@@ -26,6 +26,7 @@ class ImportedAttributeVectorReadGuard : public ImportedAttributeVector
AttributeEnumGuard _target_attribute_enum_guard;
std::unique_ptr<IGidToLidMapper> _mapper;
+protected:
uint32_t getReferencedLid(uint32_t lid) const {
return _referencedLids[lid];
}
diff --git a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h
index 1edbd67af30..435fbb21923 100644
--- a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h
+++ b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.h
@@ -53,7 +53,8 @@ public:
static datastore::ArrayStoreConfig optimizedConfigForHugePage(size_t maxSmallArraySize,
size_t hugePageSize,
size_t smallPageSize,
- size_t minNumArraysForNewBuffer);
+ size_t minNumArraysForNewBuffer,
+ float allocGrowFactor);
};
} // namespace search::attribute
diff --git a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp
index 4931322f169..83886619d0f 100644
--- a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.hpp
@@ -75,9 +75,10 @@ datastore::ArrayStoreConfig
MultiValueMapping<EntryT, RefT>::optimizedConfigForHugePage(size_t maxSmallArraySize,
size_t hugePageSize,
size_t smallPageSize,
- size_t minNumArraysForNewBuffer)
+ size_t minNumArraysForNewBuffer,
+ float allocGrowFactor)
{
- return ArrayStore::optimizedConfigForHugePage(maxSmallArraySize, hugePageSize, smallPageSize, minNumArraysForNewBuffer);
+ return ArrayStore::optimizedConfigForHugePage(maxSmallArraySize, hugePageSize, smallPageSize, minNumArraysForNewBuffer, allocGrowFactor);
}
} // namespace search::attribute
diff --git a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp
index e5cbfe8c7d8..b9042ac5f6c 100644
--- a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.hpp
@@ -21,7 +21,9 @@ MultiValueAttribute(const vespalib::string &baseFileName,
_mvMapping(MultiValueMapping::optimizedConfigForHugePage(1023,
multivalueattribute::HUGE_MEMORY_PAGE_SIZE,
multivalueattribute::SMALL_MEMORY_PAGE_SIZE,
- 8 * 1024), cfg.getGrowStrategy())
+ 8 * 1024,
+ cfg.getGrowStrategy().getMultiValueAllocGrowFactor()),
+ cfg.getGrowStrategy())
{
}
diff --git a/searchlib/src/vespa/searchlib/datastore/array_store.h b/searchlib/src/vespa/searchlib/datastore/array_store.h
index c6d3fff1b85..749e567a6ce 100644
--- a/searchlib/src/vespa/searchlib/datastore/array_store.h
+++ b/searchlib/src/vespa/searchlib/datastore/array_store.h
@@ -105,7 +105,8 @@ public:
static ArrayStoreConfig optimizedConfigForHugePage(size_t maxSmallArraySize,
size_t hugePageSize,
size_t smallPageSize,
- size_t minNumArraysForNewBuffer);
+ size_t minNumArraysForNewBuffer,
+ float allocGrowFactor);
};
}
diff --git a/searchlib/src/vespa/searchlib/datastore/array_store.hpp b/searchlib/src/vespa/searchlib/datastore/array_store.hpp
index cd45df90899..d76bd173d4a 100644
--- a/searchlib/src/vespa/searchlib/datastore/array_store.hpp
+++ b/searchlib/src/vespa/searchlib/datastore/array_store.hpp
@@ -13,7 +13,7 @@ constexpr size_t MIN_BUFFER_CLUSTERS = 8192;
template <typename EntryT, typename RefT>
ArrayStore<EntryT, RefT>::LargeArrayType::LargeArrayType(const AllocSpec &spec)
- : BufferType<LargeArray>(1, spec.minArraysInBuffer, spec.maxArraysInBuffer, spec.numArraysForNewBuffer)
+ : BufferType<LargeArray>(1, spec.minArraysInBuffer, spec.maxArraysInBuffer, spec.numArraysForNewBuffer, spec.allocGrowFactor)
{
}
@@ -38,7 +38,8 @@ ArrayStore<EntryT, RefT>::initArrayTypes(const ArrayStoreConfig &cfg)
for (uint32_t arraySize = 1; arraySize <= _maxSmallArraySize; ++arraySize) {
const AllocSpec &spec = cfg.specForSize(arraySize);
_smallArrayTypes.push_back(std::make_unique<SmallArrayType>
- (arraySize, spec.minArraysInBuffer, spec.maxArraysInBuffer, spec.numArraysForNewBuffer));
+ (arraySize, spec.minArraysInBuffer, spec.maxArraysInBuffer,
+ spec.numArraysForNewBuffer, spec.allocGrowFactor));
uint32_t typeId = _store.addType(_smallArrayTypes.back().get());
assert(typeId == arraySize); // Enforce 1-to-1 mapping between type ids and sizes for small arrays
}
@@ -188,14 +189,16 @@ ArrayStoreConfig
ArrayStore<EntryT, RefT>::optimizedConfigForHugePage(size_t maxSmallArraySize,
size_t hugePageSize,
size_t smallPageSize,
- size_t minNumArraysForNewBuffer)
+ size_t minNumArraysForNewBuffer,
+ float allocGrowFactor)
{
return ArrayStoreConfig::optimizeForHugePage(maxSmallArraySize,
hugePageSize,
smallPageSize,
sizeof(EntryT),
RefT::offsetSize(),
- minNumArraysForNewBuffer);
+ minNumArraysForNewBuffer,
+ allocGrowFactor);
}
}
diff --git a/searchlib/src/vespa/searchlib/datastore/array_store_config.cpp b/searchlib/src/vespa/searchlib/datastore/array_store_config.cpp
index 0683475930c..0581183f675 100644
--- a/searchlib/src/vespa/searchlib/datastore/array_store_config.cpp
+++ b/searchlib/src/vespa/searchlib/datastore/array_store_config.cpp
@@ -48,15 +48,16 @@ ArrayStoreConfig::optimizeForHugePage(size_t maxSmallArraySize,
size_t smallPageSize,
size_t entrySize,
size_t maxEntryRefOffset,
- size_t minNumArraysForNewBuffer)
+ size_t minNumArraysForNewBuffer,
+ float allocGrowFactor)
{
AllocSpecVector allocSpecs;
- allocSpecs.emplace_back(0, maxEntryRefOffset, minNumArraysForNewBuffer); // large array spec;
+ allocSpecs.emplace_back(0, maxEntryRefOffset, minNumArraysForNewBuffer, allocGrowFactor); // large array spec;
for (size_t arraySize = 1; arraySize <= maxSmallArraySize; ++arraySize) {
size_t numArraysForNewBuffer = hugePageSize / (entrySize * arraySize);
numArraysForNewBuffer = capToLimits(numArraysForNewBuffer, minNumArraysForNewBuffer, maxEntryRefOffset);
numArraysForNewBuffer = alignToSmallPageSize(numArraysForNewBuffer, minNumArraysForNewBuffer, smallPageSize);
- allocSpecs.emplace_back(0, maxEntryRefOffset, numArraysForNewBuffer);
+ allocSpecs.emplace_back(0, maxEntryRefOffset, numArraysForNewBuffer, allocGrowFactor);
}
return ArrayStoreConfig(allocSpecs);
}
diff --git a/searchlib/src/vespa/searchlib/datastore/array_store_config.h b/searchlib/src/vespa/searchlib/datastore/array_store_config.h
index 849ca53f35c..a39c4454308 100644
--- a/searchlib/src/vespa/searchlib/datastore/array_store_config.h
+++ b/searchlib/src/vespa/searchlib/datastore/array_store_config.h
@@ -23,12 +23,16 @@ public:
size_t maxArraysInBuffer;
// Number of arrays needed before allocating a new buffer instead of just resizing the first one.
size_t numArraysForNewBuffer;
+ // Grow factor used when allocating a new buffer.
+ float allocGrowFactor;
AllocSpec(size_t minArraysInBuffer_,
size_t maxArraysInBuffer_,
- size_t numArraysForNewBuffer_)
+ size_t numArraysForNewBuffer_,
+ float allocGrowFactor_)
: minArraysInBuffer(minArraysInBuffer_),
maxArraysInBuffer(maxArraysInBuffer_),
- numArraysForNewBuffer(numArraysForNewBuffer_) {}
+ numArraysForNewBuffer(numArraysForNewBuffer_),
+ allocGrowFactor(allocGrowFactor_) {}
};
using AllocSpecVector = std::vector<AllocSpec>;
@@ -61,7 +65,8 @@ public:
size_t smallPageSize,
size_t entrySize,
size_t maxEntryRefOffset,
- size_t minNumArraysForNewBuffer);
+ size_t minNumArraysForNewBuffer,
+ float allocGrowFactor);
};
}
diff --git a/searchlib/src/vespa/searchlib/datastore/buffer_type.cpp b/searchlib/src/vespa/searchlib/datastore/buffer_type.cpp
index 6e77b267818..798c930a3e2 100644
--- a/searchlib/src/vespa/searchlib/datastore/buffer_type.cpp
+++ b/searchlib/src/vespa/searchlib/datastore/buffer_type.cpp
@@ -6,33 +6,43 @@
namespace search::datastore {
+namespace {
+
+constexpr float DEFAULT_ALLOC_GROW_FACTOR = 0.2;
+
+}
+
void
-BufferTypeBase::CleanContext::extraBytesCleaned(uint64_t value) {
+BufferTypeBase::CleanContext::extraBytesCleaned(uint64_t value)
+{
assert(_extraBytes >= value);
_extraBytes -= value;
}
+
BufferTypeBase::BufferTypeBase(uint32_t clusterSize,
uint32_t minClusters,
uint32_t maxClusters,
- uint32_t numClustersForNewBuffer)
+ uint32_t numClustersForNewBuffer,
+ float allocGrowFactor)
: _clusterSize(clusterSize),
_minClusters(std::min(minClusters, maxClusters)),
_maxClusters(maxClusters),
_numClustersForNewBuffer(std::min(numClustersForNewBuffer, maxClusters)),
+ _allocGrowFactor(allocGrowFactor),
_activeBuffers(0),
_holdBuffers(0),
_activeUsedElems(0),
_holdUsedElems(0),
_lastUsedElems(nullptr)
-{ }
-
+{
+}
BufferTypeBase::BufferTypeBase(uint32_t clusterSize,
uint32_t minClusters,
uint32_t maxClusters)
- : BufferTypeBase(clusterSize, minClusters, maxClusters, 0u)
-{ }
-
+ : BufferTypeBase(clusterSize, minClusters, maxClusters, 0u, DEFAULT_ALLOC_GROW_FACTOR)
+{
+}
BufferTypeBase::~BufferTypeBase()
{
@@ -52,13 +62,12 @@ BufferTypeBase::getReservedElements(uint32_t bufferId) const
void
BufferTypeBase::flushLastUsed()
{
- if (_lastUsedElems != NULL) {
+ if (_lastUsedElems != nullptr) {
_activeUsedElems += *_lastUsedElems;
- _lastUsedElems = NULL;
+ _lastUsedElems = nullptr;
}
}
-
void
BufferTypeBase::onActive(uint32_t bufferId, size_t *usedElems, size_t &deadElems, void *buffer)
{
@@ -73,12 +82,12 @@ BufferTypeBase::onActive(uint32_t bufferId, size_t *usedElems, size_t &deadElems
}
}
-
void
BufferTypeBase::onHold(const size_t *usedElems)
{
- if (usedElems == _lastUsedElems)
+ if (usedElems == _lastUsedElems) {
flushLastUsed();
+ }
--_activeBuffers;
++_holdBuffers;
assert(_activeUsedElems >= *usedElems);
@@ -86,7 +95,6 @@ BufferTypeBase::onHold(const size_t *usedElems)
_holdUsedElems += *usedElems;
}
-
void
BufferTypeBase::onFree(size_t usedElems)
{
@@ -101,31 +109,31 @@ BufferTypeBase::clampMaxClusters(uint32_t maxClusters)
_maxClusters = std::min(_maxClusters, maxClusters);
_minClusters = std::min(_minClusters, _maxClusters);
_numClustersForNewBuffer = std::min(_numClustersForNewBuffer, _maxClusters);
-};
+}
size_t
BufferTypeBase::calcClustersToAlloc(uint32_t bufferId, size_t sizeNeeded, bool resizing) const
{
size_t reservedElements = getReservedElements(bufferId);
- size_t usedElems = _activeUsedElems;
- if (_lastUsedElems != NULL) {
+ size_t usedElems = (resizing ? 0 : _activeUsedElems);
+ if (_lastUsedElems != nullptr) {
usedElems += *_lastUsedElems;
}
assert((usedElems % _clusterSize) == 0);
size_t usedClusters = usedElems / _clusterSize;
size_t needClusters = (sizeNeeded + (resizing ? usedElems : reservedElements) + _clusterSize - 1) / _clusterSize;
- size_t minClusters = _minClusters;
- size_t numClustersForNewBuffer = _numClustersForNewBuffer;
- size_t extraGrowClusters = (usedElems != 0) ? numClustersForNewBuffer : 0;
- uint64_t wantClusters = usedClusters + std::max(minClusters, (resizing ? usedClusters : extraGrowClusters));
- if (wantClusters < needClusters) {
- wantClusters = needClusters;
+ size_t growClusters = (usedClusters * _allocGrowFactor);
+ size_t wantClusters = std::max((resizing ? usedClusters : 0u) + growClusters,
+ static_cast<size_t>(_minClusters));
+ size_t result = wantClusters;
+ if (result < needClusters) {
+ result = needClusters;
}
- if (wantClusters > _maxClusters) {
- wantClusters = _maxClusters;
+ if (result > _maxClusters) {
+ result = _maxClusters;
}
- assert(wantClusters >= needClusters);
- return wantClusters;
+ assert(result >= needClusters);
+ return result;
}
}
diff --git a/searchlib/src/vespa/searchlib/datastore/buffer_type.h b/searchlib/src/vespa/searchlib/datastore/buffer_type.h
index 2b7ae4f0597..321100bb811 100644
--- a/searchlib/src/vespa/searchlib/datastore/buffer_type.h
+++ b/searchlib/src/vespa/searchlib/datastore/buffer_type.h
@@ -17,9 +17,9 @@ protected:
uint32_t _clusterSize; // Number of elements in an allocation unit
uint32_t _minClusters; // Minimum number of clusters to allocate
uint32_t _maxClusters; // Maximum number of clusters to allocate
- // Number of clusters needed before allocating a new buffer
- // instead of just resizing the first one
+ // Number of clusters needed before allocating a new buffer instead of just resizing the first one
uint32_t _numClustersForNewBuffer;
+ float _allocGrowFactor;
uint32_t _activeBuffers;
uint32_t _holdBuffers;
size_t _activeUsedElems; // used elements in all but last active buffer
@@ -38,7 +38,8 @@ public:
BufferTypeBase(const BufferTypeBase &rhs) = delete;
BufferTypeBase & operator=(const BufferTypeBase &rhs) = delete;
BufferTypeBase(uint32_t clusterSize, uint32_t minClusters, uint32_t maxClusters);
- BufferTypeBase(uint32_t clusterSize, uint32_t minClusters, uint32_t maxClusters, uint32_t numClustersForNewBuffer);
+ BufferTypeBase(uint32_t clusterSize, uint32_t minClusters, uint32_t maxClusters,
+ uint32_t numClustersForNewBuffer, float allocGrowFactor);
virtual ~BufferTypeBase();
virtual void destroyElements(void *buffer, size_t numElements) = 0;
virtual void fallbackCopy(void *newBuffer, const void *oldBuffer, size_t numElements) = 0;
@@ -83,7 +84,8 @@ public:
BufferType(const BufferType &rhs) = delete;
BufferType & operator=(const BufferType &rhs) = delete;
BufferType(uint32_t clusterSize, uint32_t minClusters, uint32_t maxClusters);
- BufferType(uint32_t clusterSize, uint32_t minClusters, uint32_t maxClusters, uint32_t numClustersForNewBuffer);
+ BufferType(uint32_t clusterSize, uint32_t minClusters, uint32_t maxClusters,
+ uint32_t numClustersForNewBuffer, float allocGrowFactor);
~BufferType();
void destroyElements(void *buffer, size_t numElements) override;
void fallbackCopy(void *newBuffer, const void *oldBuffer, size_t numElements) override;
@@ -99,8 +101,9 @@ BufferType<EntryType>::BufferType(uint32_t clusterSize, uint32_t minClusters, ui
{ }
template <typename EntryType>
-BufferType<EntryType>::BufferType(uint32_t clusterSize, uint32_t minClusters, uint32_t maxClusters, uint32_t numClustersForNewBuffer)
- : BufferTypeBase(clusterSize, minClusters, maxClusters, numClustersForNewBuffer),
+BufferType<EntryType>::BufferType(uint32_t clusterSize, uint32_t minClusters, uint32_t maxClusters,
+ uint32_t numClustersForNewBuffer, float allocGrowFactor)
+ : BufferTypeBase(clusterSize, minClusters, maxClusters, numClustersForNewBuffer, allocGrowFactor),
_emptyEntry()
{ }
@@ -118,7 +121,6 @@ BufferType<EntryType>::destroyElements(void *buffer, size_t numElements)
}
}
-
template <typename EntryType>
void
BufferType<EntryType>::fallbackCopy(void *newBuffer,
@@ -134,7 +136,6 @@ BufferType<EntryType>::fallbackCopy(void *newBuffer,
}
}
-
template <typename EntryType>
void
BufferType<EntryType>::initializeReservedElements(void *buffer, size_t reservedElems)
@@ -146,7 +147,6 @@ BufferType<EntryType>::initializeReservedElements(void *buffer, size_t reservedE
}
}
-
template <typename EntryType>
void
BufferType<EntryType>::cleanHold(void *buffer, uint64_t offset, uint64_t len, CleanContext)
diff --git a/searchlib/src/vespa/searchlib/datastore/unique_store.hpp b/searchlib/src/vespa/searchlib/datastore/unique_store.hpp
index 603b6e53a85..ab526ccbfc2 100644
--- a/searchlib/src/vespa/searchlib/datastore/unique_store.hpp
+++ b/searchlib/src/vespa/searchlib/datastore/unique_store.hpp
@@ -18,11 +18,12 @@
namespace search::datastore {
constexpr size_t NUMCLUSTERS_FOR_NEW_UNIQUESTORE_BUFFER = 1024u;
+constexpr float ALLOC_GROW_FACTOR = 0.2;
template <typename EntryT, typename RefT>
UniqueStore<EntryT, RefT>::UniqueStore()
: _store(),
- _typeHandler(1, 2u, RefT::offsetSize(), NUMCLUSTERS_FOR_NEW_UNIQUESTORE_BUFFER),
+ _typeHandler(1, 2u, RefT::offsetSize(), NUMCLUSTERS_FOR_NEW_UNIQUESTORE_BUFFER, ALLOC_GROW_FACTOR),
_typeId(0),
_dict()
{
diff --git a/searchlib/src/vespa/searchlib/tensor/CMakeLists.txt b/searchlib/src/vespa/searchlib/tensor/CMakeLists.txt
index f0c8832d0ef..ea5d30d9a47 100644
--- a/searchlib/src/vespa/searchlib/tensor/CMakeLists.txt
+++ b/searchlib/src/vespa/searchlib/tensor/CMakeLists.txt
@@ -6,6 +6,8 @@ vespa_add_library(searchlib_tensor OBJECT
dense_tensor_store.cpp
generic_tensor_attribute.cpp
generic_tensor_store.cpp
+ imported_tensor_attribute_vector.cpp
+ imported_tensor_attribute_vector_read_guard.cpp
tensor_attribute.cpp
generic_tensor_attribute_saver.cpp
tensor_store.cpp
diff --git a/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.cpp b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.cpp
new file mode 100644
index 00000000000..066978f4e50
--- /dev/null
+++ b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.cpp
@@ -0,0 +1,72 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "imported_tensor_attribute_vector.h"
+#include "imported_tensor_attribute_vector_read_guard.h"
+#include <vespa/eval/tensor/tensor.h>
+
+namespace search::tensor {
+
+using vespalib::tensor::Tensor;
+
+ImportedTensorAttributeVector::ImportedTensorAttributeVector(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ bool use_search_cache)
+ : ImportedAttributeVector(name, std::move(reference_attribute),
+ std::move(target_attribute),
+ std::move(document_meta_store),
+ use_search_cache),
+ _target_tensor_attribute(dynamic_cast<const ITensorAttribute &>(*_target_attribute))
+{
+}
+
+ImportedTensorAttributeVector::ImportedTensorAttributeVector(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ std::shared_ptr<BitVectorSearchCache> search_cache)
+ : ImportedAttributeVector(name, std::move(reference_attribute),
+ std::move(target_attribute),
+ std::move(document_meta_store),
+ std::move(search_cache)),
+ _target_tensor_attribute(dynamic_cast<const ITensorAttribute &>(*_target_attribute))
+{
+}
+
+ImportedTensorAttributeVector::~ImportedTensorAttributeVector()
+{
+}
+
+std::unique_ptr<attribute::ImportedAttributeVector>
+ImportedTensorAttributeVector::makeReadGuard(bool stableEnumGuard) const
+{
+ return std::make_unique<ImportedTensorAttributeVectorReadGuard>
+ (getName(), getReferenceAttribute(), getTargetAttribute(), getDocumentMetaStore(), getSearchCache(), stableEnumGuard);
+}
+
+std::unique_ptr<Tensor>
+ImportedTensorAttributeVector::getTensor(uint32_t docId) const
+{
+ return _target_tensor_attribute.getTensor(_reference_attribute->getReferencedLid(docId));
+}
+
+std::unique_ptr<Tensor>
+ImportedTensorAttributeVector::getEmptyTensor() const
+{
+ return _target_tensor_attribute.getEmptyTensor();
+}
+
+void
+ImportedTensorAttributeVector::getTensor(uint32_t docId, vespalib::tensor::MutableDenseTensorView &tensor) const
+{
+ _target_tensor_attribute.getTensor(_reference_attribute->getReferencedLid(docId), tensor);
+}
+
+vespalib::eval::ValueType
+ImportedTensorAttributeVector::getTensorType() const
+{
+ return _target_tensor_attribute.getTensorType();
+}
+
+}
diff --git a/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h
new file mode 100644
index 00000000000..86a434cc7ae
--- /dev/null
+++ b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h
@@ -0,0 +1,39 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#pragma once
+
+#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include "i_tensor_attribute.h"
+
+namespace search::tensor {
+
+/**
+ * Attribute vector for imported tensor attributes.
+ */
+class ImportedTensorAttributeVector : public attribute::ImportedAttributeVector,
+ public ITensorAttribute
+{
+ using ReferenceAttribute = attribute::ReferenceAttribute;
+ using BitVectorSearchCache = attribute::BitVectorSearchCache;
+ const ITensorAttribute &_target_tensor_attribute;
+public:
+ ImportedTensorAttributeVector(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ bool use_search_cache);
+ ImportedTensorAttributeVector(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ std::shared_ptr<BitVectorSearchCache> search_cache);
+ ~ImportedTensorAttributeVector();
+
+ virtual std::unique_ptr<attribute::ImportedAttributeVector> makeReadGuard(bool stableEnumGuard) const override;
+ virtual std::unique_ptr<Tensor> getTensor(uint32_t docId) const override;
+ virtual std::unique_ptr<Tensor> getEmptyTensor() const override;
+ virtual void getTensor(uint32_t docId, vespalib::tensor::MutableDenseTensorView &tensor) const override;
+ virtual vespalib::eval::ValueType getTensorType() const override;
+};
+
+} // namespace search::tensor
diff --git a/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector_read_guard.cpp b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector_read_guard.cpp
new file mode 100644
index 00000000000..0678428d2c2
--- /dev/null
+++ b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector_read_guard.cpp
@@ -0,0 +1,53 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "imported_tensor_attribute_vector_read_guard.h"
+#include <vespa/eval/tensor/tensor.h>
+
+namespace search::tensor {
+
+using vespalib::tensor::Tensor;
+
+ImportedTensorAttributeVectorReadGuard::ImportedTensorAttributeVectorReadGuard(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ std::shared_ptr<BitVectorSearchCache> search_cache,
+ bool stableEnumGuard)
+ : ImportedAttributeVectorReadGuard(name, std::move(reference_attribute),
+ std::move(target_attribute),
+ std::move(document_meta_store),
+ std::move(search_cache),
+ stableEnumGuard),
+ _target_tensor_attribute(dynamic_cast<const ITensorAttribute &>(*_target_attribute))
+{
+}
+
+ImportedTensorAttributeVectorReadGuard::~ImportedTensorAttributeVectorReadGuard()
+{
+}
+
+std::unique_ptr<Tensor>
+ImportedTensorAttributeVectorReadGuard::getTensor(uint32_t docId) const
+{
+ return _target_tensor_attribute.getTensor(getReferencedLid(docId));
+}
+
+std::unique_ptr<Tensor>
+ImportedTensorAttributeVectorReadGuard::getEmptyTensor() const
+{
+ return _target_tensor_attribute.getEmptyTensor();
+}
+
+void
+ImportedTensorAttributeVectorReadGuard::getTensor(uint32_t docId, vespalib::tensor::MutableDenseTensorView &tensor) const
+{
+ _target_tensor_attribute.getTensor(getReferencedLid(docId), tensor);
+}
+
+vespalib::eval::ValueType
+ImportedTensorAttributeVectorReadGuard::getTensorType() const
+{
+ return _target_tensor_attribute.getTensorType();
+}
+
+}
diff --git a/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector_read_guard.h b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector_read_guard.h
new file mode 100644
index 00000000000..139f35d1fba
--- /dev/null
+++ b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector_read_guard.h
@@ -0,0 +1,37 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#pragma once
+
+#include <vespa/searchlib/attribute/imported_attribute_vector_read_guard.h>
+#include "i_tensor_attribute.h"
+
+namespace search::tensor {
+
+/**
+ * Short lived attribute vector for imported tensor attributes.
+ *
+ * Extra information for direct lid to referenced lid mapping with
+ * boundary check is setup during construction.
+ */
+class ImportedTensorAttributeVectorReadGuard : public attribute::ImportedAttributeVectorReadGuard,
+ public ITensorAttribute
+{
+ using ReferenceAttribute = attribute::ReferenceAttribute;
+ using BitVectorSearchCache = attribute::BitVectorSearchCache;
+ const ITensorAttribute &_target_tensor_attribute;
+public:
+ ImportedTensorAttributeVectorReadGuard(vespalib::stringref name,
+ std::shared_ptr<ReferenceAttribute> reference_attribute,
+ std::shared_ptr<AttributeVector> target_attribute,
+ std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
+ std::shared_ptr<BitVectorSearchCache> search_cache,
+ bool stableEnumGuard);
+ ~ImportedTensorAttributeVectorReadGuard();
+
+ virtual std::unique_ptr<Tensor> getTensor(uint32_t docId) const override;
+ virtual std::unique_ptr<Tensor> getEmptyTensor() const override;
+ virtual void getTensor(uint32_t docId, vespalib::tensor::MutableDenseTensorView &tensor) const override;
+ virtual vespalib::eval::ValueType getTensorType() const override;
+};
+
+} // namespace search::tensor
diff --git a/searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h b/searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h
index f9e3de79144..e49509a444f 100644
--- a/searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h
+++ b/searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h
@@ -9,6 +9,7 @@
#include <vespa/searchlib/attribute/attributeguard.h>
#include <vespa/searchlib/attribute/floatbase.h>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
+#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/not_implemented_attribute.h>
#include <vespa/searchlib/attribute/stringbase.h>
@@ -113,6 +114,15 @@ std::shared_ptr<AttrVecType> create_wset_attribute(BasicType type,
return create_typed_attribute<AttrVecType>(type, CollectionType::WSET, fast_search, FilterConfig::Default, name);
}
+template<typename AttrVecType>
+std::shared_ptr<AttrVecType> create_tensor_attribute(const vespalib::eval::ValueType &tensorType,
+ vespalib::stringref name = "parent") {
+ Config cfg(BasicType::Type::TENSOR, CollectionType::Type::SINGLE);
+ cfg.setTensorType(tensorType);
+ return std::dynamic_pointer_cast<AttrVecType>(
+ AttributeFactory::createAttribute(name, std::move(cfg)));
+}
+
template<typename VectorType>
void add_n_docs_with_undefined_values(VectorType &vec, size_t n) {
vec.addDocs(n);
@@ -157,7 +167,7 @@ struct ImportedAttributeFixture {
std::shared_ptr<ImportedAttributeVector>
create_attribute_vector_from_members(vespalib::stringref name = default_imported_attr_name()) {
- return std::make_shared<ImportedAttributeVector>(name, reference_attr, target_attr, document_meta_store, use_search_cache);
+ return ImportedAttributeVectorFactory::create(name, reference_attr, target_attr, document_meta_store, use_search_cache);
}
template<typename AttrVecType>
@@ -246,6 +256,15 @@ struct ImportedAttributeFixture {
}
});
}
+
+ template<typename AttrVecType, typename ValueType>
+ void reset_with_tensor_reference_mappings(const vespalib::eval::ValueType &tensorType,
+ const std::vector<LidToLidMapping<ValueType>> &mappings) {
+ reset_with_new_target_attr(create_tensor_attribute<AttrVecType>(tensorType));
+ set_up_and_map<AttrVecType>(mappings, [this](auto &target_vec, auto &mapping) {
+ target_vec.setTensor(mapping._to_lid, *mapping._value_in_target_attr);
+ });
+ }
};
ImportedAttributeFixture::ImportedAttributeFixture(bool use_search_cache_)
diff --git a/standalone-container/src/main/sh/standalone-container.sh b/standalone-container/src/main/sh/standalone-container.sh
index dd0693f6f85..02c71beaac5 100755
--- a/standalone-container/src/main/sh/standalone-container.sh
+++ b/standalone-container/src/main/sh/standalone-container.sh
@@ -67,6 +67,7 @@ Manage Vespa standalone jdisc container service.
Options:
-u USER Run as USER. Overrides any VESPA_USER environment variable.
-s SERVICE The service name.
+ -- ARGS... Pass the rest of the arguments (ARGS) to the Java invocation
EOF
exit 1
@@ -89,16 +90,19 @@ FixDataDirectory() {
StartCommand() {
local service="$1"
shift
-
- if (( $# > 0 )); then
- Fail "Too many arguments"
- fi
+ local -a jvm_arguments=("$@")
local service_regex='^[0-9a-zA-Z_-]+$'
if ! [[ "$service" =~ $service_regex ]]; then
Fail "Service must match regex '$service_regex'"
fi
+ local pidfile="$VESPA_HOME/var/run/$service.pid"
+ if test -r "$pidfile"; then
+ echo "$service is already running as PID $(< "$pidfile") according to $pidfile"
+ return
+ fi
+
# common setup
export VESPA_SERVICE_NAME="$service"
@@ -135,6 +139,7 @@ StartCommand() {
FixDataDirectory "$bundlecachedir"
java \
+ "${jvm_arguments[@]}" \
-Xms128m -Xmx2048m \
-XX:+PreserveFramePointer \
-XX:+HeapDumpOnOutOfMemoryError \
@@ -267,6 +272,7 @@ Main() {
local service="standalone/container"
local user="$VESPA_USER"
+ local -a jvm_arguments=()
while (( $# > 0 )); do
case "$1" in
@@ -279,6 +285,11 @@ Main() {
user="$2"
shift 2
;;
+ --)
+ shift
+ jvm_arguments=("$@")
+ break
+ ;;
*) break ;;
esac
done
@@ -300,7 +311,7 @@ Main() {
case "$command" in
help) Usage ;;
- start) StartCommand "$service" "$@" ;;
+ start) StartCommand "$service" "${jvm_arguments[@]}" ;;
stop) StopCommand "$user" "$service" "$@" ;;
*) Fail "Unknown command '$command'" ;;
esac
diff --git a/storage/src/tests/storageserver/bouncertest.cpp b/storage/src/tests/storageserver/bouncertest.cpp
index 5be57155ec9..a4f7ed915d8 100644
--- a/storage/src/tests/storageserver/bouncertest.cpp
+++ b/storage/src/tests/storageserver/bouncertest.cpp
@@ -5,6 +5,7 @@
#include <vespa/storageapi/message/state.h>
#include <vespa/storageapi/message/stat.h>
#include <vespa/storage/storageserver/bouncer.h>
+#include <vespa/storage/storageserver/bouncer_metrics.h>
#include <tests/common/teststorageapp.h>
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
@@ -122,6 +123,7 @@ BouncerTest::createDummyFeedMessage(api::Timestamp timestamp,
void
BouncerTest::testFutureTimestamp()
{
+ CPPUNIT_ASSERT_EQUAL(uint64_t(0), _manager->metrics().clock_skew_aborts.getValue());
// Fail when future timestamps (more than 5 seconds) are received.
{
@@ -134,6 +136,7 @@ BouncerTest::testFutureTimestamp()
getResult().getResult());
_upper->reset();
}
+ CPPUNIT_ASSERT_EQUAL(uint64_t(1), _manager->metrics().clock_skew_aborts.getValue());
// Verify that 1 second clock skew is OK
{
@@ -151,7 +154,7 @@ BouncerTest::testFutureTimestamp()
CPPUNIT_ASSERT_EQUAL(1, (int)_lower->getNumCommands());
}
-
+ CPPUNIT_ASSERT_EQUAL(uint64_t(1), _manager->metrics().clock_skew_aborts.getValue());
}
void
diff --git a/storage/src/vespa/storage/storageserver/CMakeLists.txt b/storage/src/vespa/storage/storageserver/CMakeLists.txt
index 4fb3a5a0b99..0f90a5a8afb 100644
--- a/storage/src/vespa/storage/storageserver/CMakeLists.txt
+++ b/storage/src/vespa/storage/storageserver/CMakeLists.txt
@@ -2,6 +2,7 @@
vespa_add_library(storage_storageserver
SOURCES
bouncer.cpp
+ bouncer_metrics.cpp
bucketintegritychecker.cpp
changedbucketownershiphandler.cpp
communicationmanager.cpp
diff --git a/storage/src/vespa/storage/storageserver/bouncer.cpp b/storage/src/vespa/storage/storageserver/bouncer.cpp
index edd3d946aea..3d068ec5f81 100644
--- a/storage/src/vespa/storage/storageserver/bouncer.cpp
+++ b/storage/src/vespa/storage/storageserver/bouncer.cpp
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "bouncer.h"
+#include "bouncer_metrics.h"
#include <vespa/storageapi/message/state.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/config/subscription/configuri.h>
@@ -8,6 +9,7 @@
#include <sstream>
#include <vespa/log/log.h>
+#include <vespa/log/bufferedlogger.h>
LOG_SETUP(".bouncer");
namespace storage {
@@ -19,9 +21,11 @@ Bouncer::Bouncer(StorageComponentRegister& compReg, const config::ConfigUri & co
_lock(),
_nodeState("s:i"),
_clusterState(&lib::State::UP),
- _configFetcher(configUri.getContext())
+ _configFetcher(configUri.getContext()),
+ _metrics(std::make_unique<BouncerMetrics>())
{
_component.getStateUpdater().addStateListener(*this);
+ _component.registerMetric(*_metrics);
// Register for config. Normally not critical, so catching config
// exception allowing program to continue if missing/faulty config.
try{
@@ -68,6 +72,10 @@ Bouncer::configure(std::unique_ptr<vespa::config::content::core::StorBouncerConf
_config = std::move(config);
}
+const BouncerMetrics& Bouncer::metrics() const noexcept {
+ return *_metrics;
+}
+
void
Bouncer::validateConfig(
const vespa::config::content::core::StorBouncerConfig& newConfig) const
@@ -108,11 +116,15 @@ void
Bouncer::abortCommandWithTooHighClockSkew(api::StorageMessage& msg,
int maxClockSkewInSeconds)
{
- std::shared_ptr<api::StorageReply> reply(
- static_cast<api::StorageCommand&>(msg).makeReply().release());
+ auto& as_cmd = dynamic_cast<api::StorageCommand&>(msg);
std::ostringstream ost;
ost << "Message " << msg.getType() << " is more than "
<< maxClockSkewInSeconds << " seconds in the future.";
+ LOGBP(warning, "Aborting operation from distributor %u: %s",
+ as_cmd.getSourceIndex(), ost.str().c_str());
+ _metrics->clock_skew_aborts.inc();
+
+ std::shared_ptr<api::StorageReply> reply(as_cmd.makeReply().release());
reply->setResult(api::ReturnCode(api::ReturnCode::ABORTED, ost.str()));
sendUp(reply);
}
diff --git a/storage/src/vespa/storage/storageserver/bouncer.h b/storage/src/vespa/storage/storageserver/bouncer.h
index f1428f9254f..6c81cb1b47a 100644
--- a/storage/src/vespa/storage/storageserver/bouncer.h
+++ b/storage/src/vespa/storage/storageserver/bouncer.h
@@ -23,6 +23,8 @@ namespace config { class ConfigUri; }
namespace storage {
+class BouncerMetrics;
+
class Bouncer : public StorageLink,
private StateListener,
private config::IFetcherCallback<vespa::config::content::core::StorBouncerConfig>
@@ -33,17 +35,19 @@ class Bouncer : public StorageLink,
lib::NodeState _nodeState;
const lib::State* _clusterState;
config::ConfigFetcher _configFetcher;
+ std::unique_ptr<BouncerMetrics> _metrics;
public:
- explicit Bouncer(StorageComponentRegister& compReg,
- const config::ConfigUri & configUri);
- ~Bouncer();
+ Bouncer(StorageComponentRegister& compReg, const config::ConfigUri & configUri);
+ ~Bouncer() override;
void print(std::ostream& out, bool verbose,
const std::string& indent) const override;
void configure(std::unique_ptr<vespa::config::content::core::StorBouncerConfig> config) override;
+ const BouncerMetrics& metrics() const noexcept;
+
private:
void validateConfig(
const vespa::config::content::core::StorBouncerConfig&) const;
diff --git a/storage/src/vespa/storage/storageserver/bouncer_metrics.cpp b/storage/src/vespa/storage/storageserver/bouncer_metrics.cpp
new file mode 100644
index 00000000000..2ee39ad22ec
--- /dev/null
+++ b/storage/src/vespa/storage/storageserver/bouncer_metrics.cpp
@@ -0,0 +1,16 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "bouncer_metrics.h"
+
+namespace storage {
+
+BouncerMetrics::BouncerMetrics()
+ : MetricSet("bouncer", "", "Metrics for Bouncer component", nullptr),
+ clock_skew_aborts("clock_skew_aborts", "", "Number of client operations that were aborted due to "
+ "clock skew between sender and receiver exceeding acceptable range", this)
+{
+}
+
+BouncerMetrics::~BouncerMetrics() = default;
+
+} \ No newline at end of file
diff --git a/storage/src/vespa/storage/storageserver/bouncer_metrics.h b/storage/src/vespa/storage/storageserver/bouncer_metrics.h
new file mode 100644
index 00000000000..9beca6c73b7
--- /dev/null
+++ b/storage/src/vespa/storage/storageserver/bouncer_metrics.h
@@ -0,0 +1,16 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#pragma once
+
+#include <vespa/metrics/metrics.h>
+
+namespace storage {
+
+struct BouncerMetrics : metrics::MetricSet {
+ metrics::LongCountMetric clock_skew_aborts;
+
+ BouncerMetrics();
+ ~BouncerMetrics() override;
+};
+
+} \ No newline at end of file
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java
index fb57c63dbf2..cbc80466dd5 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ClusterConnection.java
@@ -26,6 +26,7 @@ import java.util.concurrent.TimeUnit;
*/
@Beta
public class ClusterConnection implements AutoCloseable {
+
private final OperationProcessor operationProcessor;
private final List<IOThread> ioThreads = new ArrayList<>();
private final int clusterId;
diff --git a/vespajlib/src/main/java/com/yahoo/path/Path.java b/vespajlib/src/main/java/com/yahoo/path/Path.java
index da55c6767d1..c466fe50d6f 100644
--- a/vespajlib/src/main/java/com/yahoo/path/Path.java
+++ b/vespajlib/src/main/java/com/yahoo/path/Path.java
@@ -2,11 +2,14 @@
package com.yahoo.path;
import com.google.common.annotations.Beta;
+import com.google.common.collect.ImmutableList;
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import java.util.stream.Collectors;
/**
* Represents a path represented by a list of elements. Immutable
@@ -17,7 +20,7 @@ import java.util.List;
public final class Path {
private final String delimiter;
- private final List<String> elements = new ArrayList<>();
+ private final ImmutableList<String> elements;
/**
* Create an empty path.
@@ -39,7 +42,7 @@ public final class Path {
* @param elements a list of path elements
*/
private Path(List<String> elements, String delimiter) {
- this.elements.addAll(elements);
+ this.elements = ImmutableList.copyOf(elements);
this.delimiter = delimiter;
}
@@ -51,26 +54,20 @@ public final class Path {
/**
* Add path elements by splitting based on delimiter and appending to elements.
*/
- private void addElementsFromString(String path) {
- String[] pathElements = path.split(delimiter);
- if (pathElements != null) {
- for (String elem : pathElements) {
- if (!"".equals(elem)) {
- elements.add(elem);
- }
- }
- }
+ private static List<String> elementsOf(String path, String delimiter) {
+ return Arrays.stream(path.split(delimiter)).filter(e -> !"".equals(e)).collect(Collectors.toList());
}
/**
- * Append an element to the path. Returns a new path with this element appended.
- * @param name name of element to append.
- * @return this, for chaining
+ * Append an element to the path. Returns a new path with the given path appended.
+ *
+ * @param path the path to append to this
+ * @return the new path
*/
- public Path append(String name) {
- Path path = new Path(this);
- path.addElementsFromString(name);
- return path;
+ public Path append(String path) {
+ List<String> newElements = new ArrayList<>(this.elements);
+ newElements.addAll(elementsOf(path, delimiter));
+ return new Path(newElements, delimiter);
}
/**
@@ -80,9 +77,9 @@ public final class Path {
* @return a new path with argument appended to it.
*/
public Path append(Path path) {
- Path newPath = new Path(this);
- newPath.elements.addAll(path.elements);
- return newPath;
+ List<String> newElements = new ArrayList<>(this.elements);
+ newElements.addAll(path.elements());
+ return new Path(newElements, delimiter);
}
/**
@@ -90,9 +87,7 @@ public final class Path {
* @return the name
*/
public String getName() {
- if (elements.isEmpty()) {
- return "";
- }
+ if (elements.isEmpty()) return "";
return elements.get(elements.size() - 1);
}
@@ -141,6 +136,9 @@ public final class Path {
public Iterator<String> iterator() { return elements.iterator(); }
+ /** Returns an immutable list of the elements of this path in order */
+ public List<String> elements() { return elements; }
+
/**
* Convert to string.
*
@@ -171,9 +169,7 @@ public final class Path {
* @return a path object that may be used with the application package.
*/
public static Path fromString(String path, String delimiter) {
- Path pathObj = new Path(delimiter);
- pathObj.addElementsFromString(path);
- return pathObj;
+ return new Path(elementsOf(path, delimiter), delimiter);
}
/**
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/functions/ScalarFunctions.java b/vespajlib/src/main/java/com/yahoo/tensor/functions/ScalarFunctions.java
index 4d1abf3978f..15d4dfc1d00 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/functions/ScalarFunctions.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/functions/ScalarFunctions.java
@@ -24,12 +24,18 @@ public class ScalarFunctions {
public static DoubleBinaryOperator add() { return new Add(); }
public static DoubleBinaryOperator divide() { return new Divide(); }
public static DoubleBinaryOperator equal() { return new Equal(); }
+ public static DoubleBinaryOperator max() { return new Max(); }
+ public static DoubleBinaryOperator min() { return new Min(); }
public static DoubleBinaryOperator multiply() { return new Multiply(); }
+ public static DoubleBinaryOperator squareddifference() { return new SquaredDifference(); }
+ public static DoubleBinaryOperator subtract() { return new Subtract(); }
public static DoubleUnaryOperator acos() { return new Acos(); }
public static DoubleUnaryOperator elu() { return new Elu(); }
public static DoubleUnaryOperator exp() { return new Exp(); }
public static DoubleUnaryOperator relu() { return new Relu(); }
+ public static DoubleUnaryOperator rsqrt() { return new Rsqrt(); }
+ public static DoubleUnaryOperator selu() { return new Selu(); }
public static DoubleUnaryOperator sigmoid() { return new Sigmoid(); }
public static DoubleUnaryOperator sqrt() { return new Sqrt(); }
public static DoubleUnaryOperator square() { return new Square(); }
@@ -54,11 +60,18 @@ public class ScalarFunctions {
public String toString() { return "f(a,b)(a==b)"; }
}
- public static class Exp implements DoubleUnaryOperator {
+ public static class Max implements DoubleBinaryOperator {
@Override
- public double applyAsDouble(double operand) { return Math.exp(operand); }
+ public double applyAsDouble(double left, double right) { return Math.max(left, right); }
@Override
- public String toString() { return "f(a)(exp(a))"; }
+ public String toString() { return "f(a,b)(max(a, b))"; }
+ }
+
+ public static class Min implements DoubleBinaryOperator {
+ @Override
+ public double applyAsDouble(double left, double right) { return Math.min(left, right); }
+ @Override
+ public String toString() { return "f(a,b)(min(a, b))"; }
}
public static class Multiply implements DoubleBinaryOperator {
@@ -75,6 +88,21 @@ public class ScalarFunctions {
public String toString() { return "f(a,b)(a / b)"; }
}
+ public static class SquaredDifference implements DoubleBinaryOperator {
+ @Override
+ public double applyAsDouble(double left, double right) { return (left - right) * (left - right); }
+ @Override
+ public String toString() { return "f(a,b)((a-b) * (a-b))"; }
+ }
+
+ public static class Subtract implements DoubleBinaryOperator {
+ @Override
+ public double applyAsDouble(double left, double right) { return left - right; }
+ @Override
+ public String toString() { return "f(a,b)(a - b)"; }
+ }
+
+
// Unary operators ------------------------------------------------------------------------------
public static class Acos implements DoubleUnaryOperator {
@@ -91,6 +119,13 @@ public class ScalarFunctions {
public String toString() { return "f(a)(if(a < 0, exp(a)-1, a))"; }
}
+ public static class Exp implements DoubleUnaryOperator {
+ @Override
+ public double applyAsDouble(double operand) { return Math.exp(operand); }
+ @Override
+ public String toString() { return "f(a)(exp(a))"; }
+ }
+
public static class Relu implements DoubleUnaryOperator {
@Override
public double applyAsDouble(double operand) { return Math.max(operand, 0); }
@@ -98,6 +133,23 @@ public class ScalarFunctions {
public String toString() { return "f(a)(max(0, a))"; }
}
+ public static class Selu implements DoubleUnaryOperator {
+ // See https://arxiv.org/abs/1706.02515
+ private static final double scale = 1.0507009873554804934193349852946;
+ private static final double alpha = 1.6732632423543772848170429916717;
+ @Override
+ public double applyAsDouble(double operand) { return scale * (operand >= 0.0 ? operand : alpha * (Math.exp(operand)-1)); }
+ @Override
+ public String toString() { return String.format("f(a)(%f * if(a >= 0, a, %f*(exp(a)-1)))", scale, alpha); }
+ }
+
+ public static class Rsqrt implements DoubleUnaryOperator {
+ @Override
+ public double applyAsDouble(double operand) { return 1.0 / Math.sqrt(operand); }
+ @Override
+ public String toString() { return "f(a)(1.0 / sqrt(a))"; }
+ }
+
public static class Sigmoid implements DoubleUnaryOperator {
@Override
public double applyAsDouble(double operand) { return 1.0 / (1.0 + Math.exp(-operand)); }