├── .gitattributes ├── .gitignore ├── .lfsconfig ├── .mvn └── extensions.xml ├── .project ├── .settings └── org.eclipse.core.resources.prefs ├── Jenkinsfile ├── LICENSE ├── README.md ├── org.knime.dl.tensorflow.tests ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.launching.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.pde.api.tools.prefs ├── LICENSE.txt ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── fragment.xml ├── pom.xml └── src │ └── org │ └── knime │ └── dl │ └── tensorflow │ ├── core │ └── convert │ │ └── TFNetworkConverterRegistryTest.java │ ├── savedmodel │ └── core │ │ └── data │ │ ├── DLAbstractBytesBufferTest.java │ │ ├── DLRankOneBytesBufferTest.java │ │ ├── TFStringBytesConverterTest.java │ │ ├── TFTensorStringBufferTest.java │ │ └── convert │ │ ├── DLStringTensorToStringCellConverterFactoryTest.java │ │ └── DLStringValueToStringTensorConverterFactoryTest.java │ └── testing │ ├── TFLibraryTest.java │ ├── TFTestCaseCollector.java │ └── TFTestUtil.java ├── org.knime.dl.tensorflow ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.launching.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.pde.api.tools.prefs ├── LICENSE.txt ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── external-licenses │ ├── license-com.google.guava │ └── license-org.apache.commons.lang3 ├── icons │ ├── README │ ├── tensorflow.png │ └── tensorflow.svg ├── plugin.xml ├── py │ ├── TFModel.py │ ├── TFNetwork.py │ ├── TFNetworkTester.py │ └── TFNetworkType.py ├── schema │ └── TFNetworkConverter.exsd └── src │ └── org │ └── knime │ └── dl │ └── tensorflow │ ├── base │ ├── nodes │ │ ├── TFConfigProtoConfig.java │ │ ├── TFConfigProtoPanel.java │ │ ├── converter │ │ │ ├── TFAbstractConverterNodeModel.java │ │ │ ├── TFConverterNodeDialog.java │ │ │ └── keras │ │ │ │ ├── TFConverterNodeSetFactory.java │ │ │ │ ├── TFKerasConverterNodeFactory.java │ │ │ │ ├── TFKerasConverterNodeFactory.xml │ │ │ │ ├── TFKerasConverterNodeModel.java │ │ │ │ ├── kerasconverter-icon.svg │ │ │ │ └── kerasconverter.png │ │ ├── executor │ │ │ ├── TFExecutorNodeDialog.java │ │ │ ├── TFExecutorNodeFactory.java │ │ │ ├── TFExecutorNodeFactory.xml │ │ │ ├── TFExecutorNodeModel.java │ │ │ ├── dlexecutor-icon.svg │ │ │ └── dlexecutor.png │ │ ├── export │ │ │ ├── TFExporterNodeFactory.java │ │ │ ├── TFExporterNodeFactory.xml │ │ │ ├── tfexporter-icon.svg │ │ │ └── tfexporter.png │ │ └── reader │ │ │ ├── TFReaderNodeDialog.java │ │ │ ├── TFReaderNodeFactory.java │ │ │ ├── TFReaderNodeFactory.xml │ │ │ ├── TFReaderNodeModel.java │ │ │ ├── config │ │ │ ├── DialogComponentFileOrDirChooser.java │ │ │ ├── DialogComponentObjectSelection.java │ │ │ └── DialogComponentTensorSelection.java │ │ │ ├── tfreader-icon.svg │ │ │ └── tfreader.png │ └── portobjects │ │ ├── TFNetworkPortObject.java │ │ └── TFNetworkPortObjectSpec.java │ ├── core │ ├── DLInvalidTypeException.java │ ├── TFAbstractNetworkSpec.java │ ├── TFNetwork.java │ ├── TFNetworkSpec.java │ ├── TFPythonModuleDependency.java │ ├── TFUtil.java │ ├── convert │ │ ├── DLNetworkConversionException.java │ │ ├── TFAbstractNetworkAndSpecConverter.java │ │ ├── TFAbstractNetworkConverter.java │ │ ├── TFNetworkConverter.java │ │ ├── TFNetworkConverterRegistry.java │ │ └── keras │ │ │ └── TFKerasNetworkConverter.java │ ├── execution │ │ ├── TFAbstractExecutionContext.java │ │ ├── TFExecutionContext.java │ │ └── TFNetworkExecutionSession.java │ └── training │ │ └── TFTrainingConfig.java │ └── savedmodel │ └── core │ ├── TFMetaGraphDef.java │ ├── TFPythonCommands.java │ ├── TFPythonNetworkLoader.java │ ├── TFSavedModel.java │ ├── TFSavedModelNetwork.java │ ├── TFSavedModelNetworkSpec.java │ ├── TFSavedModelTensorFactory.java │ ├── TFSavedModelUtil.java │ ├── data │ ├── DLAbstractBytesBuffer.java │ ├── DLBytesBuffers.java │ ├── DLBytesConverter.java │ ├── DLRankFiveBytesBuffer.java │ ├── DLRankFourBytesBuffer.java │ ├── DLRankOneBytesBuffer.java │ ├── DLRankSixBytesBuffer.java │ ├── DLRankThreeBytesBuffer.java │ ├── DLRankTwoBytesBuffer.java │ ├── TFAbstractTensorObjectBuffer.java │ ├── TFStringBytesConverter.java │ ├── TFTensorBitBuffer.java │ ├── TFTensorDoubleBuffer.java │ ├── TFTensorFloatBuffer.java │ ├── TFTensorIntBuffer.java │ ├── TFTensorLongBuffer.java │ ├── TFTensorReadableBitBuffer.java │ ├── TFTensorReadableBuffer.java │ ├── TFTensorReadableDoubleBuffer.java │ ├── TFTensorReadableFloatBuffer.java │ ├── TFTensorReadableIntBuffer.java │ ├── TFTensorReadableLongBuffer.java │ ├── TFTensorReadableObjectBuffer.java │ ├── TFTensorReadableStringBuffer.java │ ├── TFTensorReadableUnsignedByteBuffer.java │ ├── TFTensorStringBuffer.java │ ├── TFTensorUnsignedByteBuffer.java │ ├── TFTensorWritableBitBuffer.java │ ├── TFTensorWritableBuffer.java │ ├── TFTensorWritableDoubleBuffer.java │ ├── TFTensorWritableFloatBuffer.java │ ├── TFTensorWritableIntBuffer.java │ ├── TFTensorWritableLongBuffer.java │ ├── TFTensorWritableObjectBuffer.java │ ├── TFTensorWritableStringBuffer.java │ ├── TFTensorWritableUnsignedByteBuffer.java │ ├── TFUniversalWrappingObjectBuffer.java │ └── convert │ │ ├── DLStringTensorToStringCellConverterFactory.java │ │ └── DLStringValueToStringTensorConverterFactory.java │ ├── execution │ ├── TFPythonSavedModelExecutionContext.java │ ├── TFPythonSavedModelNetworkExecutionSession.java │ ├── TFSavedModelExecutionContext.java │ └── TFSavedModelNetworkExecutionSession.java │ └── export │ └── TFSavedModelNetworkExporter.java ├── org.knime.dl.tensorflow2 ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.launching.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.pde.api.tools.prefs ├── LICENSE.txt ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── icons │ ├── README │ ├── tensorflow2.png │ └── tensorflow2.svg ├── plugin.xml ├── py │ ├── TF2Network.py │ ├── TF2NetworkTester.py │ └── TF2NetworkType.py └── src │ └── org │ └── knime │ └── dl │ └── tensorflow2 │ ├── base │ ├── nodes │ │ ├── executor │ │ │ ├── TF2ExecutorNodeDialog.java │ │ │ ├── TF2ExecutorNodeFactory.java │ │ │ ├── TF2ExecutorNodeFactory.xml │ │ │ ├── TF2ExecutorNodeModel.java │ │ │ ├── tf2executor.png │ │ │ └── tf2executor.svg │ │ └── io │ │ │ └── filehandling │ │ │ └── tfnetwork │ │ │ ├── reader │ │ │ ├── TF2ReaderNodeDialog.java │ │ │ ├── TF2ReaderNodeFactory.java │ │ │ ├── TF2ReaderNodeFactory.xml │ │ │ ├── TF2ReaderNodeModel.java │ │ │ ├── tf2reader.png │ │ │ └── tf2reader.svg │ │ │ └── writer │ │ │ ├── TF2WriterNodeConfig.java │ │ │ ├── TF2WriterNodeDialog.java │ │ │ ├── TF2WriterNodeFactory.java │ │ │ ├── TF2WriterNodeFactory.xml │ │ │ ├── TF2WriterNodeModel.java │ │ │ ├── tf2writer.png │ │ │ └── tf2writer.svg │ └── portobjects │ │ ├── TF2NetworkPortObject.java │ │ └── TF2NetworkPortObjectSpec.java │ └── core │ ├── TF2Network.java │ ├── TF2NetworkLoader.java │ ├── TF2NetworkSpec.java │ ├── TF2PythonCommands.java │ ├── TF2PythonContext.java │ ├── TF2PythonModuleDependency.java │ ├── TF2TrainingConfig.java │ └── execution │ ├── TF2ExecutionContext.java │ └── TF2ExecutionSession.java ├── org.knime.features.dl.tensorflow ├── .project ├── build.properties └── feature.xml ├── org.knime.features.dl.tensorflow2 ├── .project ├── build.properties └── feature.xml ├── org.knime.tensorflow.bin.linux.amd64.cpu ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.pde.api.tools.prefs ├── LICENSE.TXT ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── libs │ ├── LICENSE │ ├── LICENSE_TENSORFLOW │ ├── README │ ├── libtensorflow_framework.so │ └── libtensorflow_jni.so └── pom.xml ├── org.knime.tensorflow.bin.linux.amd64.gpu ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.pde.api.tools.prefs ├── LICENSE.TXT ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── libs │ ├── LICENSE │ ├── LICENSE_TENSORFLOW │ ├── README │ ├── libtensorflow_framework.so │ └── libtensorflow_jni.so └── pom.xml ├── org.knime.tensorflow.bin.macosx.amd64.cpu ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.pde.api.tools.prefs ├── LICENSE.TXT ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── libs │ ├── LICENSE │ ├── LICENSE_TENSORFLOW │ ├── README │ ├── libtensorflow_framework.so │ └── libtensorflow_jni.dylib └── pom.xml ├── org.knime.tensorflow.bin.windows.amd64.cpu ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.pde.api.tools.prefs ├── LICENSE.TXT ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── libs │ ├── LICENSE │ ├── LICENSE_TENSORFLOW │ ├── README │ └── tensorflow_jni.dll └── pom.xml ├── org.knime.tensorflow.bin.windows.amd64.gpu ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.pde.api.tools.prefs ├── LICENSE.TXT ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── libs │ ├── LICENSE │ ├── LICENSE_TENSORFLOW │ ├── README │ └── tensorflow_jni.dll └── pom.xml ├── org.knime.tensorflow.libs ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.pde.api.tools.prefs ├── LICENSE.TXT ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── lib │ ├── LICENSE_PROTOBUF │ ├── LICENSE_TENSORFLOW │ ├── README │ ├── libtensorflow-1.13.1.jar │ ├── proto-1.13.1.jar │ └── protobuf-java-3.5.1.jar ├── plugin.xml └── src │ └── org │ └── knime │ └── tensorflow │ └── libs │ ├── TFPluginActivator.java │ └── prefs │ ├── LabelField.java │ └── TFPreferencePage.java ├── org.knime.update.tensorflow ├── .project ├── .settings │ └── org.eclipse.m2e.core.prefs ├── category.xml └── pom.xml ├── pom.xml └── workflow-tests ├── preferences-Linux.epf ├── preferences-MacOSX.epf ├── preferences-Windows.epf └── vmargs /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto !eol 2 | **/.api_filters text diff=xml 3 | **/.classpath text diff=xml 4 | **/.project text diff=xml 5 | **/MANIFEST.MF text 6 | **/build.properties text 7 | **/p2.inf text 8 | *.ai binary filter=lfs diff=lfs merge=lfs 9 | *.bmp binary 10 | *.cspex text diff=xml 11 | *.gif binary 12 | *.html text diff=html 13 | *.ico binary 14 | *.jar binary filter=lfs diff=lfs merge=lfs 15 | *.java text diff=java 16 | *.jpg binary 17 | *.js text 18 | *.json text 19 | *.jsx text 20 | *.png binary 21 | *.prefs text 22 | *.sh text 23 | *.svg text diff=xml 24 | *.xml text diff=xml 25 | *.xsd text diff=xml 26 | *.css text diff=css 27 | *.zip binary filter=lfs diff=lfs merge=lfs 28 | *.pdf binary filter=lfs diff=lfs merge=lfs 29 | *.dll binary filter=lfs diff=lfs merge=lfs 30 | *.so binary filter=lfs diff=lfs merge=lfs 31 | *.dylib binary filter=lfs diff=lfs merge=lfs 32 | *.jsa binary filter=lfs diff=lfs merge=lfs 33 | *.sym binary filter=lfs diff=lfs merge=lfs 34 | *.msi binary filter=lfs diff=lfs merge=lfs 35 | *.tar.gz binary filter=lfs diff=lfs merge=lfs 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | */bin/ 2 | **/target/ 3 | */build/ 4 | *.pyc* 5 | **/.pydevproject 6 | **/.flattened-pom.xml 7 | */*.jar 8 | **/CHANGELOG.md 9 | -------------------------------------------------------------------------------- /.lfsconfig: -------------------------------------------------------------------------------- 1 | [lfs] 2 | url = https://bitbucket.org/KNIME/knime-tensorflow.git/info/lfs 3 | -------------------------------------------------------------------------------- /.mvn/extensions.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | org.eclipse.tycho 5 | tycho-build 6 | 4.0.7 7 | 8 | 9 | com.nuance.clu.maven 10 | maven-feature-branch-extension 11 | 1.2.1.0021-407a3b6 12 | 13 | 14 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | knime-tensorflow 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | #!groovy 2 | def BN = (BRANCH_NAME == 'master' || BRANCH_NAME.startsWith('releases/')) ? BRANCH_NAME : 'releases/2025-07' 3 | 4 | library "knime-pipeline@$BN" 5 | 6 | properties([ 7 | pipelineTriggers([ 8 | upstream('knime-deeplearning/' + env.BRANCH_NAME.replaceAll('/', '%2F')) 9 | ]), 10 | parameters(workflowTests.getConfigurationsAsParameters([ 11 | ignoreConfiguration: ['macosx-aarch'] 12 | ])), 13 | buildDiscarder(logRotator(numToKeepStr: '5')), 14 | disableConcurrentBuilds() 15 | ]) 16 | 17 | try { 18 | knimetools.defaultTychoBuild('org.knime.update.tensorflow') 19 | 20 | workflowTests.runTests( 21 | dependencies: [ 22 | repositories: [ 23 | 'knime-tensorflow', 'knime-deeplearning', 'knime-python-legacy', 'knime-conda', 24 | 'knime-filehandling', 'knime-jfreechart', 'knime-distance', 'knime-kerberos' 25 | ] 26 | ] 27 | ) 28 | 29 | stage('Sonarqube analysis') { 30 | env.lastStage = env.STAGE_NAME 31 | workflowTests.runSonar() 32 | } 33 | } catch (ex) { 34 | currentBuild.result = 'FAILURE' 35 | throw ex 36 | } finally { 37 | notifications.notifyBuild(currentBuild.result); 38 | } 39 | /* vim: set shiftwidth=4 expandtab smarttab: */ 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This repository contains parts of the KNIME Analytics Platform as a bundle of various modules. Each module is released under its own license. Please refer to the [project/directory/package] of the module to find it's corresponding license. The KNIME trademark and logo and OPEN FOR INNOVATION are registered in the United States and/or Germany, owned by KNIME AG. All other trademarks belong to their respective owners. 2 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.dl.tensorflow.tests 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.pde.PluginNature 31 | org.eclipse.jdt.core.javanature 32 | edu.umd.cs.findbugs.plugin.eclipse.findbugsNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning 4 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: KNIME Deep Learning - TensorFlow Integration Testing 4 | Bundle-SymbolicName: org.knime.dl.tensorflow.tests;singleton:=true 5 | Bundle-Version: 5.5.0.qualifier 6 | Bundle-ClassPath: . 7 | Bundle-Vendor: KNIME AG, Zurich, Switzerland 8 | Fragment-Host: org.knime.dl.tensorflow;bundle-version="[5.5.0,6.0.0)" 9 | Require-Bundle: org.junit;bundle-version="[4.12.0,5.0.0)", 10 | org.knime.testing;bundle-version="[5.5.0,6.0.0)", 11 | org.knime.dl;bundle-version="[5.5.0,6.0.0)" 12 | Bundle-RequiredExecutionEnvironment: JavaSE-11 13 | Import-Package: org.tensorflow 14 | Automatic-Module-Name: org.knime.dl.tensorflow.tests 15 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = fragment.xml,\ 2 | META-INF/,\ 3 | LICENSE.txt,\ 4 | CHANGELOG.md 5 | source.. = src/ 6 | output.. = bin/ 7 | src.includes = LICENSE.txt 8 | bin.excludes = maven.properties 9 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 11 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | org.knime 5 | knime-tensorflow 6 | ${revision}${changelist} 7 | 8 | org.knime.dl.tensorflow.tests 9 | eclipse-test-plugin 10 | 11 | 12 | 5.5.0 13 | 14 | src 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.tycho 21 | target-platform-configuration 22 | ${tycho.version} 23 | 24 | 25 | 26 | 27 | eclipse-feature 28 | org.knime.features.clfixes 29 | 0.0.0 30 | 31 | 32 | eclipse-feature 33 | org.knime.features.dl.tensorflow 34 | 0.0.0 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/src/org/knime/dl/tensorflow/savedmodel/core/data/TFStringBytesConverterTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import static org.junit.Assert.*; 50 | import static java.nio.charset.StandardCharsets.UTF_8; 51 | 52 | import org.junit.Test; 53 | 54 | /** 55 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 56 | */ 57 | public class TFStringBytesConverterTest { 58 | 59 | @Test 60 | public void testToBytes() throws Exception { 61 | String value = "knime"; 62 | assertArrayEquals(value.getBytes(UTF_8), TFStringBytesConverter.INSTANCE.toBytes(value)); 63 | } 64 | 65 | @Test 66 | public void testFromBytes() throws Exception { 67 | String stringValue = "knime"; 68 | byte[] bytesValue = stringValue.getBytes(UTF_8); 69 | assertEquals(stringValue, TFStringBytesConverter.INSTANCE.fromBytes(bytesValue)); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/src/org/knime/dl/tensorflow/testing/TFTestCaseCollector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.testing; 48 | 49 | import org.knime.testing.core.AbstractTestcaseCollector; 50 | 51 | /** 52 | * @author Marcel Wiedenmann, KNIME, Konstanz, Germany 53 | * @author Christian Dietz, KNIME, Konstanz, Germany 54 | * @author Benjamin Willhelm, KNIME, Konstanz, Germany 55 | */ 56 | public class TFTestCaseCollector extends AbstractTestcaseCollector { 57 | // registered at extension point, nothing to do here 58 | } 59 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow.tests/src/org/knime/dl/tensorflow/testing/TFTestUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.testing; 48 | 49 | import static org.junit.Assert.assertEquals; 50 | 51 | import org.knime.dl.core.DLDefaultTensorId; 52 | import org.knime.dl.core.DLDefaultTensorSpec; 53 | import org.knime.dl.core.DLDimensionOrder; 54 | import org.knime.dl.core.DLTensorShape; 55 | import org.knime.dl.core.DLTensorSpec; 56 | import org.knime.dl.tensorflow.savedmodel.core.data.TFTensorStringBuffer; 57 | 58 | /** 59 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 60 | */ 61 | public class TFTestUtil { 62 | private TFTestUtil() { 63 | // static utility class 64 | } 65 | 66 | public static void assertBufferFilledWithValue(TFTensorStringBuffer buffer, String value) { 67 | for (int i = 0; i < buffer.getCapacity(); i++) { 68 | assertEquals(value, buffer.readNext()); 69 | } 70 | } 71 | 72 | public static void fillBufferWithValue(TFTensorStringBuffer buffer, String value) { 73 | for (int i = 0; i < buffer.getCapacity(); i++) { 74 | buffer.put(value); 75 | } 76 | } 77 | 78 | public static DLTensorSpec createSpec(DLTensorShape shape) { 79 | return new DLDefaultTensorSpec(new DLDefaultTensorId("spec"), "spec", 1, shape, String.class, 80 | DLDimensionOrder.TDHWC); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.dl.tensorflow 4 | 5 | 6 | 7 | 8 | 9 | org.python.pydev.PyDevBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.pde.PluginNature 36 | org.eclipse.jdt.core.javanature 37 | org.python.pydev.pythonNature 38 | edu.umd.cs.findbugs.plugin.eclipse.findbugsNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning 4 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: KNIME Deep Learning - TensorFlow Integration 4 | Bundle-SymbolicName: org.knime.dl.tensorflow;singleton:=true 5 | Bundle-Version: 5.5.0.qualifier 6 | Bundle-ClassPath: knime-dl-tensorflow.jar 7 | Bundle-Vendor: KNIME AG, Zurich, Switzerland 8 | Export-Package: org.knime.dl.tensorflow.base.nodes.converter, 9 | org.knime.dl.tensorflow.base.portobjects, 10 | org.knime.dl.tensorflow.core, 11 | org.knime.dl.tensorflow.core.convert, 12 | org.knime.dl.tensorflow.savedmodel.core 13 | Require-Bundle: org.knime.base;bundle-version="[5.5.0,6.0.0)", 14 | org.knime.base.filehandling;bundle-version="[5.5.0,6.0.0)", 15 | org.knime.core;bundle-version="[5.5.0,6.0.0)", 16 | org.knime.dl;bundle-version="[5.5.0,6.0.0)", 17 | org.knime.dl.python;bundle-version="[5.5.0,6.0.0)", 18 | org.knime.python2;bundle-version="[5.5.0,6.0.0)", 19 | org.apache.commons.lang3;bundle-version="[3.2.1,4.0.0)", 20 | com.google.guava;bundle-version="[19.0.0,19.0.0]", 21 | org.knime.tensorflow.libs;bundle-version="[5.5.0,6.0.0)", 22 | org.knime.dl.keras;bundle-version="[5.5.0,6.0.0)", 23 | org.apache.commons.commons-io;bundle-version="[2.15.1,3.0.0)" 24 | Bundle-RequiredExecutionEnvironment: JavaSE-11 25 | Bundle-ActivationPolicy: lazy 26 | Eclipse-BundleShape: dir 27 | Automatic-Module-Name: org.knime.dl.tensorflow 28 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = META-INF/,\ 2 | plugin.xml,\ 3 | icons/,\ 4 | knime-dl-tensorflow.jar,\ 5 | py/,\ 6 | LICENSE.txt,\ 7 | CHANGELOG.md 8 | jars.compile.order = knime-dl-tensorflow.jar 9 | src.includes = LICENSE.txt,\ 10 | external-licenses/ 11 | source.knime-dl-tensorflow.jar = src/ 12 | bin.excludes = maven.properties 13 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/icons/README: -------------------------------------------------------------------------------- 1 | By FlorianCassayre (Own work) [CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0)], via Wikimedia Commons 2 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/icons/tensorflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knime/knime-tensorflow/e19fd201b424565fe750485e53c6d544c1bf0930/org.knime.dl.tensorflow/icons/tensorflow.png -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/icons/tensorflow.svg: -------------------------------------------------------------------------------- 1 | 2 | 13 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 27 | 30 | 32 | 37 | 42 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/py/TFNetworkTester.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # ------------------------------------------------------------------------ 4 | # Copyright by KNIME AG, Zurich, Switzerland 5 | # Website: http://www.knime.com; Email: contact@knime.com 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License, Version 3, as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, but 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, see . 18 | # 19 | # Additional permission under GNU GPL version 3 section 7: 20 | # 21 | # KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | # Hence, KNIME and ECLIPSE are both independent programs and are not 23 | # derived from each other. Should, however, the interpretation of the 24 | # GNU GPL Version 3 ("License") under any applicable laws result in 25 | # KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | # you the additional permission to use and propagate KNIME together with 27 | # ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | # ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | # license terms of ECLIPSE themselves allow for the respective use and 30 | # propagation of ECLIPSE together with KNIME. 31 | # 32 | # Additional permission relating to nodes for KNIME that extend the Node 33 | # Extension (and in particular that are based on subclasses of NodeModel, 34 | # NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | # standard APIs ("Nodes"): 36 | # Nodes are deemed to be separate and independent programs and to not be 37 | # covered works. Notwithstanding anything to the contrary in the 38 | # License, the License does not apply to Nodes, you are not required to 39 | # license Nodes under the License, and you are granted a license to 40 | # prepare and propagate Nodes, in each case even if such Nodes are 41 | # propagated with or for interoperation with KNIME. The owner of a Node 42 | # may freely choose the license terms applicable to such Node, including 43 | # when such Node is propagated with or for interoperation with KNIME. 44 | # ------------------------------------------------------------------------ 45 | 46 | ''' 47 | @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 48 | ''' 49 | 50 | def test(): 51 | import TFNetworkType 52 | print(TFNetworkType.instance().test_installation(), end='', flush=True) 53 | 54 | test() 55 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/py/TFNetworkType.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # ------------------------------------------------------------------------ 4 | # Copyright by KNIME AG, Zurich, Switzerland 5 | # Website: http://www.knime.com; Email: contact@knime.com 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License, Version 3, as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, but 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, see . 18 | # 19 | # Additional permission under GNU GPL version 3 section 7: 20 | # 21 | # KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | # Hence, KNIME and ECLIPSE are both independent programs and are not 23 | # derived from each other. Should, however, the interpretation of the 24 | # GNU GPL Version 3 ("License") under any applicable laws result in 25 | # KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | # you the additional permission to use and propagate KNIME together with 27 | # ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | # ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | # license terms of ECLIPSE themselves allow for the respective use and 30 | # propagation of ECLIPSE together with KNIME. 31 | # 32 | # Additional permission relating to nodes for KNIME that extend the Node 33 | # Extension (and in particular that are based on subclasses of NodeModel, 34 | # NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | # standard APIs ("Nodes"): 36 | # Nodes are deemed to be separate and independent programs and to not be 37 | # covered works. Notwithstanding anything to the contrary in the 38 | # License, the License does not apply to Nodes, you are not required to 39 | # license Nodes under the License, and you are granted a license to 40 | # prepare and propagate Nodes, in each case even if such Nodes are 41 | # propagated with or for interoperation with KNIME. The owner of a Node 42 | # may freely choose the license terms applicable to such Node, including 43 | # when such Node is propagated with or for interoperation with KNIME. 44 | # ------------------------------------------------------------------------ 45 | 46 | ''' 47 | @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 48 | ''' 49 | 50 | import DLPythonNetworkType 51 | 52 | class TFNetworkType(DLPythonNetworkType.DLPythonNetworkType): 53 | 54 | def __init__(self): 55 | # TODO real identifier 56 | super().__init__('org.knime.dl.tensorflow.savedmodel.core.TFSavedModelNetwork') 57 | 58 | @property 59 | def reader(self): 60 | from TFNetwork import TFNetworkReader 61 | return TFNetworkReader() 62 | 63 | def supports_model(self, model): 64 | from TFModel import TFModel 65 | return isinstance(model, TFModel) 66 | 67 | def wrap_model(self, model): 68 | from TFNetwork import TFNetwork 69 | return TFNetwork(model) 70 | 71 | def _test_installation(self, tester): 72 | tester.check_lib('tensorflow', min_version="1.4.0") 73 | 74 | 75 | # pseudo-singleton: 76 | _instance = TFNetworkType() 77 | # register network type 78 | DLPythonNetworkType.add_network_type(_instance) 79 | # access point for other modules 80 | 81 | 82 | def instance(): 83 | return _instance 84 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/schema/TFNetworkConverter.exsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Extension point for deep learning network converters that allow conversion of deep learning network to TensorFlow models. 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | The converter class that implements the TFNetworkConverter interface. Must provide an empty public constructor. 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | KNIME v3.6 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | Converter classes must implement the TFNetworkConverter interface and provide an empty public constructor. 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | Copyright by KNIME AG, Zurich, Switzerland 91 | Website: http://www.knime.com; Email: contact@knime.com 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/converter/keras/TFKerasConverterNodeFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.base.nodes.converter.keras; 48 | 49 | import org.knime.core.node.NodeDialogPane; 50 | import org.knime.core.node.NodeFactory; 51 | import org.knime.core.node.NodeView; 52 | import org.knime.dl.tensorflow.base.nodes.converter.TFConverterNodeDialog; 53 | 54 | /** 55 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 56 | */ 57 | public class TFKerasConverterNodeFactory extends NodeFactory { 58 | 59 | @Override 60 | public TFKerasConverterNodeModel createNodeModel() { 61 | return new TFKerasConverterNodeModel(); 62 | } 63 | 64 | @Override 65 | protected int getNrNodeViews() { 66 | return 0; 67 | } 68 | 69 | @Override 70 | public NodeView createNodeView(final int viewIndex, 71 | final TFKerasConverterNodeModel nodeModel) { 72 | return null; 73 | } 74 | 75 | @Override 76 | protected boolean hasDialog() { 77 | return true; 78 | } 79 | 80 | @Override 81 | protected NodeDialogPane createNodeDialogPane() { 82 | return new TFConverterNodeDialog(TFKerasConverterNodeModel::getDefaultPythonCommand); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/converter/keras/TFKerasConverterNodeFactory.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Keras to TensorFlow Network Converter 7 | 8 | 9 | Converts a Keras deep learning model with TensorFlow 10 | backend to a TensorFlow model. 11 | 12 | 13 | 14 | 15 | Converts a Keras deep learning model with TensorFlow backend to 16 | a TensorFlow model. TensorFlow models can be executed using the 17 | TensorFlow Java API which is usually faster then using a Python 18 | kernel to execute the model via the Keras Python API. 19 | 20 | 21 | KNIME Deep Learning TensorFlow Integration 22 | 23 | 24 | 25 | The Keras deep learning network. 26 | 27 | The TensorFlow deep learning network. 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/converter/keras/kerasconverter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knime/knime-tensorflow/e19fd201b424565fe750485e53c6d544c1bf0930/org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/converter/keras/kerasconverter.png -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/executor/TFExecutorNodeFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.base.nodes.executor; 48 | 49 | import org.knime.core.node.NodeDialogPane; 50 | import org.knime.core.node.NodeFactory; 51 | import org.knime.core.node.NodeView; 52 | import org.knime.dl.base.nodes.executor2.DLAbstractExecutorNodeModel; 53 | 54 | /** 55 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 56 | */ 57 | public class TFExecutorNodeFactory extends NodeFactory { 58 | 59 | @Override 60 | public DLAbstractExecutorNodeModel createNodeModel() { 61 | return new TFExecutorNodeModel(); 62 | } 63 | 64 | @Override 65 | protected int getNrNodeViews() { 66 | return 0; 67 | } 68 | 69 | @Override 70 | public NodeView createNodeView(final int viewIndex, 71 | final DLAbstractExecutorNodeModel nodeModel) { 72 | return null; 73 | } 74 | 75 | @Override 76 | protected boolean hasDialog() { 77 | return true; 78 | } 79 | 80 | @Override 81 | protected NodeDialogPane createNodeDialogPane() { 82 | return new TFExecutorNodeDialog(); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/executor/TFExecutorNodeFactory.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | TensorFlow Network Executor 7 | 8 | 9 | Executes a TensorFlow deep learning network. 10 | 11 | 12 | 13 | 14 | This node executes a TensorFlow deep learning network on a 15 | compatible external back end that can be selected by the user. 16 | 17 | 18 | 22 | 25 | 26 | 27 | 32 | 38 | 39 | 40 | 44 | 48 | 49 | 50 | 74 | 79 | 80 | 81 | KNIME Deep Learning TensorFlow Integration 82 | 83 | 84 | 85 | 86 | The TensorFlow deep learning network. 87 | 88 | The input table. 89 | The output table. 90 | 91 | 92 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/executor/dlexecutor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knime/knime-tensorflow/e19fd201b424565fe750485e53c6d544c1bf0930/org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/executor/dlexecutor.png -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/export/TFExporterNodeFactory.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | TensorFlow Network Writer 7 | 8 | 9 | Writes a TensorFlow network to a file. 10 | 11 | 12 | 13 | 14 | Writes a TensorFlow network to a file or directory. 15 | 16 | 33 | 37 | 38 | KNIME Deep Learning TensorFlow Integration 39 | 40 | 41 | 42 | The TensorFlow deep learning network. 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/export/tfexporter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knime/knime-tensorflow/e19fd201b424565fe750485e53c6d544c1bf0930/org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/export/tfexporter.png -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/reader/TFReaderNodeFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.base.nodes.reader; 48 | 49 | import org.knime.core.node.NodeDialogPane; 50 | import org.knime.core.node.NodeFactory; 51 | import org.knime.core.node.NodeView; 52 | 53 | /** 54 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 55 | */ 56 | public class TFReaderNodeFactory extends NodeFactory { 57 | 58 | @Override 59 | public TFReaderNodeModel createNodeModel() { 60 | return new TFReaderNodeModel(); 61 | } 62 | 63 | @Override 64 | protected int getNrNodeViews() { 65 | return 0; 66 | } 67 | 68 | @Override 69 | public NodeView createNodeView(final int viewIndex, 70 | final TFReaderNodeModel nodeModel) { 71 | return null; 72 | } 73 | 74 | @Override 75 | protected boolean hasDialog() { 76 | return true; 77 | } 78 | 79 | @Override 80 | protected NodeDialogPane createNodeDialogPane() { 81 | return new TFReaderNodeDialog(); 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/reader/TFReaderNodeFactory.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | TensorFlow Network Reader 7 | 8 | 9 | Reads a TensorFlow saved model from an input zip file 10 | or directory. 11 | 12 | 13 | 14 | 15 | This node reads a TensorFlow deep learning network from a directory 16 | or zip file. 17 |

18 | If the network should be read from a directory, it has to be a 19 | valid SavedModel. 20 | If the network should be read from a zip file, it 21 | must contain a valid SavedModel. 22 |

23 |

24 | See the TensorFlow documentation for more information on 25 | SavedModels: 26 | 28 | Structure of a SavedModel directory 29 | 30 |

31 |
32 | 33 | 38 | 42 | 47 | 53 | 54 | 55 | 63 | 67 | 71 | 72 | 73 | KNIME Deep Learning TensorFlow Integration 74 | 75 |
76 | 77 | The TensorFlow deep learning network. 78 | 79 | 80 |
81 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/reader/tfreader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knime/knime-tensorflow/e19fd201b424565fe750485e53c6d544c1bf0930/org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/base/nodes/reader/tfreader.png -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/core/DLInvalidTypeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.core; 48 | 49 | import org.knime.dl.core.DLCheckedException; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public class DLInvalidTypeException extends DLCheckedException { 55 | 56 | private static final long serialVersionUID = 1L; 57 | 58 | /** 59 | * @param message must be neither null nor empty 60 | */ 61 | public DLInvalidTypeException(final String message) { 62 | super(message); 63 | } 64 | 65 | /** 66 | * @param message must be neither null nor empty 67 | * @param cause see {@link Throwable#Throwable(String, Throwable)} 68 | */ 69 | public DLInvalidTypeException(final String message, final Throwable cause) { 70 | super(message, cause); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/core/TFNetwork.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.core; 48 | 49 | import java.io.IOException; 50 | 51 | import org.knime.core.data.filestore.FileStore; 52 | import org.knime.dl.python.core.DLPythonNetwork; 53 | 54 | /** 55 | * A TensorFlow deep learning network. 56 | * 57 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 58 | */ 59 | public interface TFNetwork extends DLPythonNetwork { 60 | 61 | @Override 62 | TFNetworkSpec getSpec(); 63 | 64 | /** 65 | * Copy the files of the network from the source to the given file store for saving it with the workflow. 66 | * The implementation can be limited to only include files which are known to be important for reading 67 | * the model. 68 | * 69 | * @param destination the file store 70 | * @throws IOException if copying the file store failed 71 | */ 72 | void copyFilesToFileStore(FileStore destination) throws IOException; 73 | } 74 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/core/TFPythonModuleDependency.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.core; 48 | 49 | import java.util.HashSet; 50 | import java.util.Set; 51 | 52 | import org.knime.dl.python.core.DLPythonModuleDependency; 53 | import org.knime.python2.PythonModuleSpec; 54 | 55 | /** 56 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 57 | */ 58 | public class TFPythonModuleDependency implements DLPythonModuleDependency { 59 | 60 | @Override 61 | public Set getModuleSpecs() { 62 | final Set modules = new HashSet<>(); 63 | modules.add(new PythonModuleSpec("tensorflow")); 64 | return modules; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/core/execution/TFExecutionContext.java: -------------------------------------------------------------------------------- 1 | package org.knime.dl.tensorflow.core.execution; 2 | 3 | import java.util.Set; 4 | 5 | import org.knime.dl.core.DLNetworkInputPreparer; 6 | import org.knime.dl.core.DLTensorId; 7 | import org.knime.dl.core.DLTensorSpec; 8 | import org.knime.dl.core.execution.DLExecutionContext; 9 | import org.knime.dl.core.execution.DLNetworkOutputConsumer; 10 | import org.knime.dl.tensorflow.core.TFNetwork; 11 | 12 | /** 13 | * A execution context for TensorFlow deep learning networks. 14 | * 15 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 16 | */ 17 | interface TFExecutionContext extends DLExecutionContext { 18 | 19 | @Override 20 | TFNetworkExecutionSession createExecutionSession(C context, N network, Set executionInputSpecs, 21 | Set requestedOutputs, DLNetworkInputPreparer inputPreparer, DLNetworkOutputConsumer outputConsumer); 22 | } 23 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/core/execution/TFNetworkExecutionSession.java: -------------------------------------------------------------------------------- 1 | package org.knime.dl.tensorflow.core.execution; 2 | 3 | import org.knime.dl.core.execution.DLNetworkExecutionSession; 4 | 5 | /** 6 | * TODO is a TensorFlow execution session always a DLPythonExecutionSession? 7 | * 8 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 9 | */ 10 | public interface TFNetworkExecutionSession extends DLNetworkExecutionSession { 11 | 12 | // NB: marker interface 13 | 14 | } 15 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/core/training/TFTrainingConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.core.training; 48 | 49 | import org.knime.dl.core.training.DLTrainingConfig; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTrainingConfig extends DLTrainingConfig { 55 | // TODO add methods for TensorFlow specific training configuration 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/DLBytesBuffers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | /** 50 | * Static factory class for {@link DLBytesBuffer} objects. 51 | * 52 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 53 | */ 54 | final class DLBytesBuffers { 55 | 56 | private static final long[] SCALAR_SHAPE = new long[] { 1l }; 57 | 58 | private DLBytesBuffers() { 59 | // static factory class 60 | } 61 | 62 | public static TFUniversalWrappingObjectBuffer createBytesBuffer(long[] shape) { 63 | int rank = shape.length; 64 | switch (rank) { 65 | case 0: 66 | // scalar value is interpreted as Tensor with shape [1] 67 | return new DLRankOneBytesBuffer(SCALAR_SHAPE); 68 | case 1: 69 | return new DLRankOneBytesBuffer(shape); 70 | case 2: 71 | return new DLRankTwoBytesBuffer(shape); 72 | case 3: 73 | return new DLRankThreeBytesBuffer(shape); 74 | case 4: 75 | return new DLRankFourBytesBuffer(shape); 76 | case 5: 77 | return new DLRankFiveBytesBuffer(shape); 78 | case 6: 79 | return new DLRankSixBytesBuffer(shape); 80 | default: 81 | throw new IllegalArgumentException("Requested buffer for rank " + rank 82 | + " tensor but currently only buffers up to rank 6 are supported"); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/DLBytesConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | /** 50 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 51 | */ 52 | interface DLBytesConverter { 53 | 54 | public byte[] toBytes(T value); 55 | 56 | public T fromBytes(byte[] data); 57 | } 58 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/DLRankOneBytesBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | /** 50 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 51 | */ 52 | final class DLRankOneBytesBuffer extends DLAbstractBytesBuffer { 53 | 54 | /** 55 | * @param shape including the batch dimension 56 | */ 57 | protected DLRankOneBytesBuffer(long[] shape) { 58 | super(shape); 59 | } 60 | 61 | @Override 62 | protected byte[] retrieveFromStorage(int[] position) { 63 | assert position.length == 1; 64 | return m_storage[position[0]]; 65 | } 66 | 67 | @Override 68 | protected void placeInStorage(byte[] value, int[] position) { 69 | m_storage[position[0]] = value; 70 | } 71 | 72 | @Override 73 | protected long getLength(byte[][] storage) { 74 | return storage.length; 75 | } 76 | 77 | @Override 78 | protected byte[][] createStorage(int[] shape) { 79 | if (shape.length != 1) { 80 | throw new IllegalArgumentException( 81 | "Invalid shape. Can't create a DLRankOneBytesBuffer from a rank " + shape.length + " shape."); 82 | } 83 | return new byte[shape[0]][]; 84 | } 85 | 86 | @Override 87 | protected byte[][] createEmptySubArray(int length) { 88 | return new byte[length][]; 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFStringBytesConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import static java.nio.charset.StandardCharsets.UTF_8; 50 | 51 | /** 52 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 53 | */ 54 | enum TFStringBytesConverter implements DLBytesConverter { 55 | INSTANCE; 56 | 57 | @Override 58 | public byte[] toBytes(String value) { 59 | return value.getBytes(UTF_8); 60 | } 61 | 62 | @Override 63 | public String fromBytes(byte[] data) { 64 | return new String(data, UTF_8); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorReadableBitBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLReadableBitBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorReadableBitBuffer extends TFTensorReadableBuffer, DLReadableBitBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorReadableBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.DLInvalidNetworkOutputException; 50 | import org.knime.dl.core.data.DLReadableBuffer; 51 | import org.tensorflow.Tensor; 52 | 53 | /** 54 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 55 | */ 56 | public interface TFTensorReadableBuffer extends DLReadableBuffer { 57 | 58 | /** 59 | * Writes the data of the tensor into the buffer. 60 | * 61 | * @param tensor the tensor 62 | * @throws DLInvalidNetworkOutputException if the data of the tensor could not be read into the buffer 63 | */ 64 | void writeFromTensor(Tensor tensor) throws DLInvalidNetworkOutputException; 65 | } 66 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorReadableDoubleBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLReadableDoubleBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorReadableDoubleBuffer extends TFTensorReadableBuffer, DLReadableDoubleBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorReadableFloatBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLReadableFloatBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorReadableFloatBuffer extends TFTensorReadableBuffer, DLReadableFloatBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorReadableIntBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLReadableIntBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorReadableIntBuffer extends TFTensorReadableBuffer, DLReadableIntBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorReadableLongBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLReadableLongBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorReadableLongBuffer extends TFTensorReadableBuffer, DLReadableLongBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorReadableObjectBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLReadableObjectBuffer; 50 | 51 | /** 52 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 53 | * @param The type of objects stored in this buffer 54 | */ 55 | public interface TFTensorReadableObjectBuffer extends TFTensorReadableBuffer, DLReadableObjectBuffer { 56 | // marker interface 57 | } 58 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorReadableStringBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLReadableStringBuffer; 50 | 51 | /** 52 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorReadableStringBuffer extends TFTensorReadableObjectBuffer, DLReadableStringBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorReadableUnsignedByteBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLReadableUnsignedByteBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorReadableUnsignedByteBuffer extends TFTensorReadableBuffer, DLReadableUnsignedByteBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorStringBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | /** 50 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 51 | */ 52 | public class TFTensorStringBuffer extends TFAbstractTensorObjectBuffer 53 | implements TFTensorReadableStringBuffer, TFTensorWritableStringBuffer { 54 | 55 | /** 56 | * @param shape 57 | */ 58 | public TFTensorStringBuffer(long[] shape) { 59 | super(TFStringBytesConverter.INSTANCE, shape); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorWritableBitBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLWritableBitBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorWritableBitBuffer extends TFTensorWritableBuffer, DLWritableBitBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorWritableBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.DLFixedTensorShape; 50 | import org.knime.dl.core.DLInvalidNetworkInputException; 51 | import org.knime.dl.core.data.DLWritableBuffer; 52 | import org.tensorflow.Tensor; 53 | 54 | /** 55 | * @param Type of the TensorFlow {@link Tensor}. 56 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 57 | */ 58 | public interface TFTensorWritableBuffer extends DLWritableBuffer { 59 | 60 | /** 61 | * Reads the content of the buffer and creates a new tensor containing the data. 62 | *

63 | * WARNING: The Tensor object must be explicitly freed by invoking the 64 | * {@link #close()} method when the object is no longer needed. 65 | * 66 | * @param batchSize the batch size which will be the size of the first dimension of the tensor 67 | * @param shape the shape of the tensor 68 | * @return a tensor with the content of the buffer. 69 | * @throws DLInvalidNetworkInputException if no tensor could be created from this buffer 70 | */ 71 | Tensor readIntoTensor(long batchSize, DLFixedTensorShape shape) throws DLInvalidNetworkInputException; 72 | } 73 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorWritableDoubleBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLWritableDoubleBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorWritableDoubleBuffer extends TFTensorWritableBuffer, DLWritableDoubleBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorWritableFloatBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLWritableFloatBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorWritableFloatBuffer extends TFTensorWritableBuffer, DLWritableFloatBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorWritableIntBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLWritableIntBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorWritableIntBuffer extends TFTensorWritableBuffer, DLWritableIntBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorWritableLongBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLWritableLongBuffer; 50 | 51 | /** 52 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorWritableLongBuffer extends TFTensorWritableBuffer, DLWritableLongBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorWritableObjectBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLWritableObjectBuffer; 50 | 51 | /** 52 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 53 | * @param the type of objects stored in this buffer 54 | */ 55 | public interface TFTensorWritableObjectBuffer 56 | extends DLWritableObjectBuffer, TFTensorWritableBuffer { 57 | 58 | } 59 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorWritableStringBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLWritableStringBuffer; 50 | 51 | /** 52 | * @author Adrian Nembach, KNIME GmbH, Konstanz, Germany 53 | */ 54 | public interface TFTensorWritableStringBuffer extends TFTensorWritableObjectBuffer, DLWritableStringBuffer { 55 | 56 | } 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow/src/org/knime/dl/tensorflow/savedmodel/core/data/TFTensorWritableUnsignedByteBuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow.savedmodel.core.data; 48 | 49 | import org.knime.dl.core.data.DLWritableUnsignedByteBuffer; 50 | import org.tensorflow.types.UInt8; 51 | 52 | /** 53 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 54 | */ 55 | public interface TFTensorWritableUnsignedByteBuffer extends TFTensorWritableBuffer, DLWritableUnsignedByteBuffer { 56 | 57 | } 58 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.dl.tensorflow2 4 | 5 | 6 | 7 | 8 | 9 | org.python.pydev.PyDevBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.pde.PluginNature 36 | org.eclipse.jdt.core.javanature 37 | org.python.pydev.pythonNature 38 | edu.umd.cs.findbugs.plugin.eclipse.findbugsNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//py/TF2Network.py=utf-8 3 | encoding//py/TF2NetworkTester.py=utf-8 4 | encoding//py/TF2NetworkType.py=utf-8 5 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning 3 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning 4 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: KNIME Deep Learning - TensorFlow 2 Integration 4 | Bundle-SymbolicName: org.knime.dl.tensorflow2;singleton:=true 5 | Automatic-Module-Name: org.knime.dl.tensorflow2 6 | Bundle-Version: 5.5.0.qualifier 7 | Bundle-ClassPath: knime-dl-tensorflow.jar 8 | Bundle-Vendor: KNIME AG, Zurich, Switzerland 9 | Require-Bundle: org.knime.core;bundle-version="[5.5.0,6.0.0)", 10 | org.knime.base;bundle-version="[5.5.0,6.0.0)", 11 | org.knime.base.filehandling;bundle-version="[5.5.0,6.0.0)", 12 | org.knime.filehandling.core;bundle-version="[5.5.0,6.0.0)", 13 | org.knime.dl;bundle-version="[5.5.0,6.0.0)", 14 | org.knime.dl.python;bundle-version="[5.5.0,6.0.0)", 15 | org.knime.python2;bundle-version="[5.5.0,6.0.0)", 16 | org.apache.commons.lang3;bundle-version="[3.2.1,4.0.0)", 17 | org.apache.commons.commons-compress;bundle-version="[1.15.0,2.0.0)", 18 | com.google.guava;bundle-version="[19.0.0,19.0.0]", 19 | org.apache.commons.commons-io;bundle-version="[2.15.1,3.0.0)" 20 | Bundle-RequiredExecutionEnvironment: JavaSE-11 21 | Bundle-ActivationPolicy: lazy 22 | Eclipse-BundleShape: dir 23 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = META-INF/,\ 2 | plugin.xml,\ 3 | knime-dl-tensorflow.jar,\ 4 | py/,\ 5 | LICENSE.txt,\ 6 | icons/,\ 7 | CHANGELOG.md 8 | jars.compile.order = knime-dl-tensorflow.jar 9 | src.includes = LICENSE.txt 10 | source.knime-dl-tensorflow.jar = src/ 11 | bin.excludes = maven.properties 12 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/icons/README: -------------------------------------------------------------------------------- 1 | The icon was downloaded from https://www.tensorflow.org/extras/tensorflow_brand_guidelines.pdf 2 | The KNIME Deep Learning - TensorFlow 2 Integration is developed by KNIME and uses the TensorFlow 2 library. 3 | The KNIME Deep Learning - TensorFlow 2 Integration is not endorsed by or otherwise affiliated with Google. 4 | TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc. 5 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/icons/tensorflow2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knime/knime-tensorflow/e19fd201b424565fe750485e53c6d544c1bf0930/org.knime.dl.tensorflow2/icons/tensorflow2.png -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 15 | 16 | 18 | 24 | 25 | 26 | 28 | 32 | 33 | 37 | 38 | 42 | 43 | 44 | 46 | 48 | 49 | 50 | 52 | 54 | 55 | 56 | 58 | 60 | 61 | 62 | 64 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/py/TF2NetworkTester.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # ------------------------------------------------------------------------ 4 | # Copyright by KNIME AG, Zurich, Switzerland 5 | # Website: http://www.knime.com; Email: contact@knime.com 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License, Version 3, as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, but 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, see . 18 | # 19 | # Additional permission under GNU GPL version 3 section 7: 20 | # 21 | # KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | # Hence, KNIME and ECLIPSE are both independent programs and are not 23 | # derived from each other. Should, however, the interpretation of the 24 | # GNU GPL Version 3 ("License") under any applicable laws result in 25 | # KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | # you the additional permission to use and propagate KNIME together with 27 | # ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | # ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | # license terms of ECLIPSE themselves allow for the respective use and 30 | # propagation of ECLIPSE together with KNIME. 31 | # 32 | # Additional permission relating to nodes for KNIME that extend the Node 33 | # Extension (and in particular that are based on subclasses of NodeModel, 34 | # NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | # standard APIs ("Nodes"): 36 | # Nodes are deemed to be separate and independent programs and to not be 37 | # covered works. Notwithstanding anything to the contrary in the 38 | # License, the License does not apply to Nodes, you are not required to 39 | # license Nodes under the License, and you are granted a license to 40 | # prepare and propagate Nodes, in each case even if such Nodes are 41 | # propagated with or for interoperation with KNIME. The owner of a Node 42 | # may freely choose the license terms applicable to such Node, including 43 | # when such Node is propagated with or for interoperation with KNIME. 44 | # ------------------------------------------------------------------------ 45 | 46 | ''' 47 | @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 48 | ''' 49 | 50 | 51 | def test(): 52 | import TF2NetworkType 53 | print(TF2NetworkType.instance().test_installation(), end='', flush=True) 54 | 55 | 56 | test() 57 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/py/TF2NetworkType.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # ------------------------------------------------------------------------ 4 | # Copyright by KNIME AG, Zurich, Switzerland 5 | # Website: http://www.knime.com; Email: contact@knime.com 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License, Version 3, as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, but 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, see . 18 | # 19 | # Additional permission under GNU GPL version 3 section 7: 20 | # 21 | # KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | # Hence, KNIME and ECLIPSE are both independent programs and are not 23 | # derived from each other. Should, however, the interpretation of the 24 | # GNU GPL Version 3 ("License") under any applicable laws result in 25 | # KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | # you the additional permission to use and propagate KNIME together with 27 | # ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | # ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | # license terms of ECLIPSE themselves allow for the respective use and 30 | # propagation of ECLIPSE together with KNIME. 31 | # 32 | # Additional permission relating to nodes for KNIME that extend the Node 33 | # Extension (and in particular that are based on subclasses of NodeModel, 34 | # NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | # standard APIs ("Nodes"): 36 | # Nodes are deemed to be separate and independent programs and to not be 37 | # covered works. Notwithstanding anything to the contrary in the 38 | # License, the License does not apply to Nodes, you are not required to 39 | # license Nodes under the License, and you are granted a license to 40 | # prepare and propagate Nodes, in each case even if such Nodes are 41 | # propagated with or for interoperation with KNIME. The owner of a Node 42 | # may freely choose the license terms applicable to such Node, including 43 | # when such Node is propagated with or for interoperation with KNIME. 44 | # ------------------------------------------------------------------------ 45 | 46 | ''' 47 | @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 48 | ''' 49 | 50 | import DLPythonNetworkType 51 | 52 | 53 | class TF2NetworkType(DLPythonNetworkType.DLPythonNetworkType): 54 | 55 | def __init__(self): 56 | super().__init__('org.knime.dl.tensorflow2.core.TF2Network') 57 | 58 | @property 59 | def reader(self): 60 | from TF2Network import TF2NetworkReader 61 | return TF2NetworkReader() 62 | 63 | def supports_model(self, model): 64 | import tensorflow as tf 65 | return isinstance(model, tf.keras.Model) 66 | 67 | def wrap_model(self, model): 68 | from TF2Network import TF2Network 69 | return TF2Network(model) 70 | 71 | def _test_installation(self, tester): 72 | tester.check_lib('tensorflow', min_version="2.2.0") 73 | 74 | 75 | # pseudo-singleton: 76 | _instance = TF2NetworkType() 77 | # register network type 78 | DLPythonNetworkType.add_network_type(_instance) 79 | # access point for other modules 80 | 81 | 82 | def instance(): 83 | return _instance 84 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/executor/TF2ExecutorNodeDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow2.base.nodes.executor; 48 | 49 | import org.knime.dl.python.base.node.DLAbstractPythonBasedExecutorNodeDialog; 50 | 51 | /** 52 | * The node dialog for the TensorFlow 2 Executor. 53 | * 54 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 55 | */ 56 | final class TF2ExecutorNodeDialog extends DLAbstractPythonBasedExecutorNodeDialog { 57 | 58 | // TODO add TF2 specific settings (GPU settings) 59 | 60 | public TF2ExecutorNodeDialog() { 61 | super(TF2ExecutorNodeModel::getDefaultPythonCommand); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/executor/TF2ExecutorNodeFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow2.base.nodes.executor; 48 | 49 | import org.knime.core.node.NodeDialogPane; 50 | import org.knime.core.node.NodeFactory; 51 | import org.knime.core.node.NodeView; 52 | import org.knime.dl.base.nodes.executor2.DLAbstractExecutorNodeModel; 53 | 54 | /** 55 | * The node factory for the TensorFlow 2 Executor. 56 | * 57 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 58 | */ 59 | public class TF2ExecutorNodeFactory extends NodeFactory { 60 | 61 | @Override 62 | public DLAbstractExecutorNodeModel createNodeModel() { 63 | return new TF2ExecutorNodeModel(); 64 | } 65 | 66 | @Override 67 | protected int getNrNodeViews() { 68 | return 0; 69 | } 70 | 71 | @Override 72 | public NodeView createNodeView(final int viewIndex, 73 | final DLAbstractExecutorNodeModel nodeModel) { 74 | return null; 75 | } 76 | 77 | @Override 78 | protected boolean hasDialog() { 79 | return true; 80 | } 81 | 82 | @Override 83 | protected NodeDialogPane createNodeDialogPane() { 84 | return new TF2ExecutorNodeDialog(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/executor/TF2ExecutorNodeFactory.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | TensorFlow 2 Network Executor 7 | 8 | 9 | Executes a TensorFlow deep learning network. 10 | 11 | 12 | 13 | 14 | This node executes a TensorFlow 2 deep learning network. 15 |

16 | 17 | The KNIME Deep Learning - TensorFlow 2 Integration is developed by 18 | KNIME and uses the TensorFlow 2 library. The KNIME Deep Learning - 19 | TensorFlow 2 Integration is not endorsed by or otherwise affiliated 20 | with Google. TensorFlow, the TensorFlow logo and any related marks 21 | are trademarks of Google Inc. 22 | 23 |

24 | 25 | 26 | 30 | 33 | 34 | 35 | 40 | 46 | 47 | 48 | 52 | 56 | 57 | 58 | KNIME Deep Learning Documentation 59 | 60 | 61 | 62 | 63 | The TensorFlow 2 deep learning network. 64 | 65 | The input table. 66 | The output table. 67 | 68 | 69 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/executor/TF2ExecutorNodeModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow2.base.nodes.executor; 48 | 49 | import org.knime.dl.python.base.node.DLAbstractPythonBasedExecutorNodeModel; 50 | import org.knime.dl.python.prefs.DLPythonPreferences; 51 | import org.knime.dl.tensorflow2.base.portobjects.TF2NetworkPortObject; 52 | import org.knime.python2.PythonCommand; 53 | 54 | /** 55 | * The node model for the TensorFlow 2 Executor. 56 | * 57 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 58 | */ 59 | final class TF2ExecutorNodeModel extends DLAbstractPythonBasedExecutorNodeModel { 60 | 61 | static PythonCommand getDefaultPythonCommand() { 62 | return DLPythonPreferences.getPythonTF2CommandPreference(); 63 | } 64 | 65 | TF2ExecutorNodeModel() { 66 | super(TF2NetworkPortObject.TYPE, TF2ExecutorNodeModel::getDefaultPythonCommand); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/executor/tf2executor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knime/knime-tensorflow/e19fd201b424565fe750485e53c6d544c1bf0930/org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/executor/tf2executor.png -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/io/filehandling/tfnetwork/reader/tf2reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knime/knime-tensorflow/e19fd201b424565fe750485e53c6d544c1bf0930/org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/io/filehandling/tfnetwork/reader/tf2reader.png -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/io/filehandling/tfnetwork/writer/tf2writer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knime/knime-tensorflow/e19fd201b424565fe750485e53c6d544c1bf0930/org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/base/nodes/io/filehandling/tfnetwork/writer/tf2writer.png -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/core/TF2Network.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | * History 47 | * Apr 27, 2020 (benjamin): created 48 | */ 49 | package org.knime.dl.tensorflow2.core; 50 | 51 | import org.knime.dl.core.DLNetworkLocation; 52 | import org.knime.dl.python.core.DLPythonAbstractNetwork; 53 | 54 | /** 55 | * A TensorFlow model representing a tf.keras.Model in the SavedModel format. 56 | * 57 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 58 | */ 59 | public class TF2Network extends DLPythonAbstractNetwork { 60 | 61 | /** 62 | * Create a new TensorFlow 2 network. The network must be saved as a SavedModel in the source location. 63 | * 64 | * @param spec the specification of the network 65 | * @param source the location where the SavedModel is located 66 | */ 67 | public TF2Network(final TF2NetworkSpec spec, final DLNetworkLocation source) { 68 | super(spec, source); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/core/TF2PythonModuleDependency.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | */ 47 | package org.knime.dl.tensorflow2.core; 48 | 49 | import java.util.HashSet; 50 | import java.util.Set; 51 | 52 | import org.knime.core.util.Version; 53 | import org.knime.dl.python.core.DLPythonModuleDependency; 54 | import org.knime.python2.PythonModuleSpec; 55 | 56 | /** 57 | * A dependency to the TensorFlow 2.2.0 Python library. 58 | * 59 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 60 | */ 61 | public class TF2PythonModuleDependency implements DLPythonModuleDependency { 62 | 63 | @Override 64 | public Set getModuleSpecs() { 65 | final Set modules = new HashSet<>(); 66 | modules.add(new PythonModuleSpec("tensorflow", new Version(2, 2, 0), true, new Version(3, 0, 0), false)); 67 | return modules; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /org.knime.dl.tensorflow2/src/org/knime/dl/tensorflow2/core/TF2TrainingConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ------------------------------------------------------------------------ 3 | * 4 | * Copyright by KNIME AG, Zurich, Switzerland 5 | * Website: http://www.knime.com; Email: contact@knime.com 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License, Version 3, as 9 | * published by the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, see . 18 | * 19 | * Additional permission under GNU GPL version 3 section 7: 20 | * 21 | * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. 22 | * Hence, KNIME and ECLIPSE are both independent programs and are not 23 | * derived from each other. Should, however, the interpretation of the 24 | * GNU GPL Version 3 ("License") under any applicable laws result in 25 | * KNIME and ECLIPSE being a combined program, KNIME AG herewith grants 26 | * you the additional permission to use and propagate KNIME together with 27 | * ECLIPSE with only the license terms in place for ECLIPSE applying to 28 | * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the 29 | * license terms of ECLIPSE themselves allow for the respective use and 30 | * propagation of ECLIPSE together with KNIME. 31 | * 32 | * Additional permission relating to nodes for KNIME that extend the Node 33 | * Extension (and in particular that are based on subclasses of NodeModel, 34 | * NodeDialog, and NodeView) and that only interoperate with KNIME through 35 | * standard APIs ("Nodes"): 36 | * Nodes are deemed to be separate and independent programs and to not be 37 | * covered works. Notwithstanding anything to the contrary in the 38 | * License, the License does not apply to Nodes, you are not required to 39 | * license Nodes under the License, and you are granted a license to 40 | * prepare and propagate Nodes, in each case even if such Nodes are 41 | * propagated with or for interoperation with KNIME. The owner of a Node 42 | * may freely choose the license terms applicable to such Node, including 43 | * when such Node is propagated with or for interoperation with KNIME. 44 | * --------------------------------------------------------------------- 45 | * 46 | * History 47 | * Apr 27, 2020 (benjamin): created 48 | */ 49 | package org.knime.dl.tensorflow2.core; 50 | 51 | import org.knime.dl.core.training.DLTrainingConfig; 52 | 53 | /** 54 | * The training configuration of a {@link TF2Network}. 55 | * 56 | * @author Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany 57 | */ 58 | public class TF2TrainingConfig implements DLTrainingConfig { 59 | 60 | @Override 61 | public int getEpochs() { 62 | throw new UnsupportedOperationException("Not yet implemented."); 63 | } 64 | 65 | @Override 66 | public long getBatchSize() { 67 | throw new UnsupportedOperationException("Not yet implemented."); 68 | } 69 | 70 | @Override 71 | public long getValidationBatchSize() { 72 | throw new UnsupportedOperationException("Not yet implemented."); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /org.knime.features.dl.tensorflow/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.features.dl.tensorflow 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.FeatureBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.pde.FeatureNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.knime.features.dl.tensorflow/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = feature.xml,\ 2 | CHANGELOG.md 3 | bin.excludes = maven.properties 4 | -------------------------------------------------------------------------------- /org.knime.features.dl.tensorflow2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.features.dl.tensorflow2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.FeatureBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.pde.FeatureNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.knime.features.dl.tensorflow2/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = feature.xml,\ 2 | CHANGELOG.md 3 | bin.excludes = maven.properties 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.cpu/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.tensorflow.bin.linux.amd64.cpu 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.ManifestBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.SchemaBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.pde.PluginNature 21 | 22 | 23 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.cpu/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: TensorFlow CPU Libraries for Linux x86_64 4 | Bundle-SymbolicName: org.knime.tensorflow.bin.linux.amd64.cpu;singleton:=true 5 | Bundle-Version: 5.5.0.qualifier 6 | Bundle-Vendor: KNIME AG, Zurich, Switzerland 7 | Fragment-Host: org.knime.tensorflow.libs;bundle-version="[5.2.0,6.0.0)" 8 | Eclipse-PlatformFilter: (&(osgi.os=linux)(osgi.arch=x86_64)) 9 | Bundle-RequiredExecutionEnvironment: JavaSE-11 10 | Eclipse-BundleShape: dir 11 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.cpu/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = META-INF/,\ 2 | libs/libtensorflow_framework.so,\ 3 | libs/libtensorflow_jni.so,\ 4 | LICENSE.TXT,\ 5 | CHANGELOG.md 6 | src.includes = libs/LICENSE,\ 7 | libs/LICENSE_TENSORFLOW,\ 8 | libs/README,\ 9 | LICENSE.TXT 10 | bin.excludes = maven.properties 11 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.cpu/libs/README: -------------------------------------------------------------------------------- 1 | This folder contains dependencies to the following projects: 2 | 3 | * TensorFlow, https://github.com/tensorflow/tensorflow, The TensorFlow Authors, LICENSE_TENSORFLOW -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.cpu/libs/libtensorflow_framework.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:526b20f2e5c0707857d392d54475cdf589aaeb116491fe54e09b09177c6634da 3 | size 18723344 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.cpu/libs/libtensorflow_jni.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:157c42013b8f3799a54c64f87f673a78feb9ce4a71e0838baa359c2412f768d7 3 | size 134929448 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.cpu/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.knime 7 | knime-tensorflow 8 | ${revision}${changelist} 9 | ../pom.xml 10 | 11 | org.knime.tensorflow.bin.linux.amd64.cpu 12 | ${revision}${changelist} 13 | eclipse-plugin 14 | 15 | 16 | 5.5.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | org.eclipse.tycho 24 | target-platform-configuration 25 | ${tycho.version} 26 | 27 | p2 28 | 29 | 30 | linux 31 | x86_64 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.gpu/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.tensorflow.bin.linux.amd64.gpu 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.ManifestBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.SchemaBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.pde.PluginNature 21 | 22 | 23 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.gpu/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: TensorFlow GPU Libraries for Linux x86_64 4 | Bundle-SymbolicName: org.knime.tensorflow.bin.linux.amd64.gpu;singleton:=true 5 | Bundle-Version: 5.5.0.qualifier 6 | Bundle-Vendor: KNIME AG, Zurich, Switzerland 7 | Fragment-Host: org.knime.tensorflow.libs;bundle-version="[5.2.0,6.0.0)" 8 | Eclipse-PlatformFilter: (&(osgi.os=linux)(osgi.arch=x86_64)) 9 | Bundle-RequiredExecutionEnvironment: JavaSE-11 10 | Eclipse-BundleShape: dir 11 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.gpu/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = META-INF/,\ 2 | libs/libtensorflow_framework.so,\ 3 | libs/libtensorflow_jni.so,\ 4 | LICENSE.TXT,\ 5 | CHANGELOG.md 6 | src.includes = libs/LICENSE,\ 7 | libs/LICENSE_TENSORFLOW,\ 8 | libs/README,\ 9 | LICENSE.TXT 10 | bin.excludes = maven.properties 11 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.gpu/libs/README: -------------------------------------------------------------------------------- 1 | This folder contains dependencies to the following projects: 2 | 3 | * TensorFlow, https://github.com/tensorflow/tensorflow, The TensorFlow Authors, LICENSE_TENSORFLOW -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.gpu/libs/libtensorflow_framework.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bf8a569e33ab2cc35371a8dccbcda7f771ad40bbb4d97a8727721fc1e2a371ab 3 | size 19798441 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.gpu/libs/libtensorflow_jni.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0a597f2b90218f642bfa53ac5f6d41a06282183c7116f825e7d459beef6a4757 3 | size 281091096 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.linux.amd64.gpu/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.knime 7 | knime-tensorflow 8 | ${revision}${changelist} 9 | ../pom.xml 10 | 11 | org.knime.tensorflow.bin.linux.amd64.gpu 12 | ${revision}${changelist} 13 | eclipse-plugin 14 | 15 | 16 | 5.5.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | org.eclipse.tycho 24 | target-platform-configuration 25 | ${tycho.version} 26 | 27 | p2 28 | 29 | 30 | linux 31 | x86_64 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.macosx.amd64.cpu/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.tensorflow.bin.macosx.amd64.cpu 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.ManifestBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.SchemaBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.pde.PluginNature 21 | 22 | 23 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.macosx.amd64.cpu/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: TensorFlow CPU Libraries for OSX 4 | Bundle-SymbolicName: org.knime.tensorflow.bin.macosx.amd64.cpu;singleton:=true 5 | Bundle-Version: 5.5.0.qualifier 6 | Bundle-Vendor: KNIME AG, Zurich, Switzerland 7 | Fragment-Host: org.knime.tensorflow.libs;bundle-version="[5.2.0,6.0.0)" 8 | Eclipse-PlatformFilter: (&(osgi.os=macosx)(osgi.arch=x86_64)) 9 | Bundle-RequiredExecutionEnvironment: JavaSE-11 10 | Eclipse-BundleShape: dir 11 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.macosx.amd64.cpu/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = META-INF/,\ 2 | libs/libtensorflow_framework.so,\ 3 | libs/libtensorflow_jni.dylib,\ 4 | LICENSE.TXT,\ 5 | CHANGELOG.md 6 | src.includes = libs/LICENSE,\ 7 | libs/LICENSE_TENSORFLOW,\ 8 | libs/README,\ 9 | LICENSE.TXT 10 | bin.excludes = maven.properties 11 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.macosx.amd64.cpu/libs/README: -------------------------------------------------------------------------------- 1 | This folder contains dependencies to the following projects: 2 | 3 | * TensorFlow, https://github.com/tensorflow/tensorflow, The TensorFlow Authors, LICENSE_TENSORFLOW -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.macosx.amd64.cpu/libs/libtensorflow_framework.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e828b145539a74e608e5fdfbb805ca2b8447021103eb765558253abe0825c499 3 | size 14136480 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.macosx.amd64.cpu/libs/libtensorflow_jni.dylib: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:003e2a32652887e024ef1229722b1042da323bc1c62847b88e8d89eee1c0b2d6 3 | size 182327388 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.macosx.amd64.cpu/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.knime 7 | knime-tensorflow 8 | ${revision}${changelist} 9 | ../pom.xml 10 | 11 | org.knime.tensorflow.bin.macosx.amd64.cpu 12 | ${revision}${changelist} 13 | eclipse-plugin 14 | 15 | 16 | 5.5.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | org.eclipse.tycho 24 | target-platform-configuration 25 | ${tycho.version} 26 | 27 | p2 28 | 29 | 30 | macosx 31 | x86_64 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.cpu/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.tensorflow.bin.windows.amd64.cpu 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.ManifestBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.SchemaBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.pde.PluginNature 21 | 22 | 23 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.cpu/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: TensorFlow CPU Libraries for Windows x86_64 4 | Bundle-SymbolicName: org.knime.tensorflow.bin.windows.amd64.cpu;singleton:=true 5 | Bundle-Version: 5.5.0.qualifier 6 | Bundle-Vendor: KNIME AG, Zurich, Switzerland 7 | Fragment-Host: org.knime.tensorflow.libs;bundle-version="[5.2.0,6.0.0)" 8 | Eclipse-PlatformFilter: (&(osgi.os=win32)(osgi.arch=x86_64)) 9 | Bundle-RequiredExecutionEnvironment: JavaSE-11 10 | Eclipse-BundleShape: dir 11 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.cpu/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = META-INF/,\ 2 | libs/tensorflow_jni.dll,\ 3 | LICENSE.TXT,\ 4 | CHANGELOG.md 5 | src.includes = libs/LICENSE,\ 6 | libs/LICENSE_TENSORFLOW,\ 7 | libs/README,\ 8 | LICENSE.TXT 9 | bin.excludes = maven.properties 10 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.cpu/libs/README: -------------------------------------------------------------------------------- 1 | This folder contains dependencies to the following projects: 2 | 3 | * TensorFlow, https://github.com/tensorflow/tensorflow, The TensorFlow Authors, LICENSE_TENSORFLOW -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.cpu/libs/tensorflow_jni.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d913992bd92530c5b1778be65acc1fb8b0cf559be4d688eb6e1e0fd140121e00 3 | size 76734464 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.cpu/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.knime 7 | knime-tensorflow 8 | ${revision}${changelist} 9 | ../pom.xml 10 | 11 | org.knime.tensorflow.bin.windows.amd64.cpu 12 | ${revision}${changelist} 13 | eclipse-plugin 14 | 15 | 16 | 5.5.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | org.eclipse.tycho 24 | target-platform-configuration 25 | ${tycho.version} 26 | 27 | p2 28 | 29 | 30 | win32 31 | x86_64 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.gpu/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.tensorflow.bin.windows.amd64.gpu 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.ManifestBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.SchemaBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.pde.PluginNature 21 | 22 | 23 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.gpu/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: TensorFlow GPU Libraries for Windows x86_64 4 | Bundle-SymbolicName: org.knime.tensorflow.bin.windows.amd64.gpu;singleton:=true 5 | Bundle-Version: 5.5.0.qualifier 6 | Bundle-Vendor: KNIME AG, Zurich, Switzerland 7 | Fragment-Host: org.knime.tensorflow.libs;bundle-version="[5.2.0,6.0.0)" 8 | Eclipse-PlatformFilter: (&(osgi.os=win32)(osgi.arch=x86_64)) 9 | Bundle-RequiredExecutionEnvironment: JavaSE-11 10 | Eclipse-BundleShape: dir 11 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.gpu/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = META-INF/,\ 2 | libs/tensorflow_jni.dll,\ 3 | LICENSE.TXT,\ 4 | CHANGELOG.md 5 | src.includes = libs/LICENSE,\ 6 | libs/LICENSE_TENSORFLOW,\ 7 | libs/README,\ 8 | LICENSE.TXT 9 | bin.excludes = maven.properties 10 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.gpu/libs/README: -------------------------------------------------------------------------------- 1 | This folder contains dependencies to the following projects: 2 | 3 | * TensorFlow, https://github.com/tensorflow/tensorflow, The TensorFlow Authors, LICENSE_TENSORFLOW -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.gpu/libs/tensorflow_jni.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e08cb10b8e360295502aab9ce02ba835ea7e14be4ac58525280ce3cabd9bf88f 3 | size 769531392 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.bin.windows.amd64.gpu/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.knime 7 | knime-tensorflow 8 | ${revision}${changelist} 9 | ../pom.xml 10 | 11 | org.knime.tensorflow.bin.windows.amd64.gpu 12 | ${revision}${changelist} 13 | eclipse-plugin 14 | 15 | 16 | 5.5.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | org.eclipse.tycho 24 | target-platform-configuration 25 | ${tycho.version} 26 | 27 | p2 28 | 29 | 30 | win32 31 | x86_64 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.tensorflow.libs 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.pde.PluginNature 26 | org.eclipse.jdt.core.javanature 27 | 28 | 29 | -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: TensorFlow Libraries 4 | Bundle-SymbolicName: org.knime.tensorflow.libs;singleton:=true 5 | Bundle-Version: 5.5.0.qualifier 6 | Bundle-ClassPath: ., 7 | lib/libtensorflow-1.13.1.jar, 8 | lib/proto-1.13.1.jar, 9 | lib/protobuf-java-3.5.1.jar 10 | Bundle-Activator: org.knime.tensorflow.libs.TFPluginActivator 11 | Bundle-Vendor: KNIME AG, Zurich, Switzerland 12 | Export-Package: com.google.protobuf, 13 | org.tensorflow, 14 | org.tensorflow.framework, 15 | org.tensorflow.op, 16 | org.tensorflow.types 17 | Require-Bundle: org.eclipse.ui;bundle-version="[3.108.0,4.0.0)", 18 | org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)", 19 | org.knime.core;bundle-version="[5.5.0,6.0.0)" 20 | Bundle-RequiredExecutionEnvironment: JavaSE-11 21 | Bundle-ActivationPolicy: lazy 22 | Automatic-Module-Name: org.knime.tensorflow.libs 23 | -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | output.. = bin/ 3 | bin.includes = META-INF/,\ 4 | .,\ 5 | lib/libtensorflow-1.13.1.jar,\ 6 | lib/proto-1.13.1.jar,\ 7 | lib/protobuf-java-3.5.1.jar,\ 8 | plugin.xml,\ 9 | LICENSE.TXT,\ 10 | CHANGELOG.md 11 | src.includes = LICENSE.TXT 12 | bin.excludes = maven.properties 13 | -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/lib/LICENSE_PROTOBUF: -------------------------------------------------------------------------------- 1 | 2 | This license applies to all parts of Protocol Buffers except the following: 3 | 4 | - Atomicops support for generic gcc, located in 5 | src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. 6 | This file is copyrighted by Red Hat Inc. 7 | 8 | - Atomicops support for AIX/POWER, located in 9 | src/google/protobuf/stubs/atomicops_internals_power.h. 10 | This file is copyrighted by Bloomberg Finance LP. 11 | 12 | Copyright 2014, Google Inc. All rights reserved. 13 | 14 | Redistribution and use in source and binary forms, with or without 15 | modification, are permitted provided that the following conditions are 16 | met: 17 | 18 | * Redistributions of source code must retain the above copyright 19 | notice, this list of conditions and the following disclaimer. 20 | * Redistributions in binary form must reproduce the above 21 | copyright notice, this list of conditions and the following disclaimer 22 | in the documentation and/or other materials provided with the 23 | distribution. 24 | * Neither the name of Google Inc. nor the names of its 25 | contributors may be used to endorse or promote products derived from 26 | this software without specific prior written permission. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | 40 | Code generated by the Protocol Buffer compiler is owned by the owner 41 | of the input file used when generating it. This code is not 42 | standalone and requires a support library to be linked with it. This 43 | support library is itself covered by the above license. -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/lib/README: -------------------------------------------------------------------------------- 1 | This folder contains dependencies to the following projects: 2 | 3 | * TensorFlow, https://github.com/tensorflow/tensorflow, The TensorFlow Authors, LICENSE_TENSORFLOW 4 | * Protocol Buffers, https://github.com/google/protobuf, Google Inc., LICENSE_PROTOBUF -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/lib/libtensorflow-1.13.1.jar: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d467bd22eb952f37872c27fac5ffedfdaf0fff6012c33cee67146013e4b49bc5 3 | size 1657205 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/lib/proto-1.13.1.jar: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:917bd6c389402cb851b82fb1d326b6d3a4396098cdd8296ab59cc44057393859 3 | size 2372508 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/lib/protobuf-java-3.5.1.jar: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b5e2d91812d183c9f053ffeebcbcda034d4de6679521940a19064714966c2cd4 3 | size 1411071 4 | -------------------------------------------------------------------------------- /org.knime.tensorflow.libs/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /org.knime.update.tensorflow/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.knime.update.tensorflow 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.knime.update.tensorflow/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /org.knime.update.tensorflow/category.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Build artifacts from knime-tensorflow 18 | 19 | 20 | -------------------------------------------------------------------------------- /org.knime.update.tensorflow/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.knime 7 | knime-tensorflow 8 | ${revision}${changelist} 9 | ../pom.xml 10 | 11 | 12 | org.knime.update.tensorflow 13 | eclipse-repository 14 | 15 | 16 | 5.5.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /workflow-tests/preferences-Linux.epf: -------------------------------------------------------------------------------- 1 | @org.knime.workbench.core=2.10.0.0043156 2 | \!/= 3 | file_export_version=3.0 4 | /instance/org.knime.python2/pythonEnvironmentType=conda 5 | /instance/org.knime.python2/condaDirectoryPath=/home/jenkins/miniconda3 6 | /instance/org.knime.python2/python2CondaEnvironmentDirectoryPath=/home/jenkins/miniconda3/envs/py2_knime 7 | /instance/org.knime.python2/python3CondaEnvironmentDirectoryPath=/home/jenkins/miniconda3/envs/py3_knime 8 | -------------------------------------------------------------------------------- /workflow-tests/preferences-MacOSX.epf: -------------------------------------------------------------------------------- 1 | @org.knime.workbench.core=2.10.0.0043156 2 | \!/= 3 | file_export_version=3.0 4 | /instance/org.knime.python2/pythonEnvironmentType=conda 5 | /instance/org.knime.python2/condaDirectoryPath=/Users/jenkins/miniconda3 6 | /instance/org.knime.python2/python2CondaEnvironmentDirectoryPath=/Users/jenkins/miniconda3/envs/py2_knime 7 | /instance/org.knime.python2/python3CondaEnvironmentDirectoryPath=/Users/jenkins/miniconda3/envs/py3_knime 8 | -------------------------------------------------------------------------------- /workflow-tests/preferences-Windows.epf: -------------------------------------------------------------------------------- 1 | @org.knime.workbench.core=2.10.0.0043156 2 | \!/= 3 | file_export_version=3.0 4 | /instance/org.knime.python2/pythonEnvironmentType=conda 5 | /instance/org.knime.python2/condaDirectoryPath=C:\\Users\\jenkins\\Miniconda3 6 | /instance/org.knime.python2/python2CondaEnvironmentDirectoryPath=C:\\Users\\jenkins\\Miniconda3\\envs\\py2_knime 7 | /instance/org.knime.python2/python3CondaEnvironmentDirectoryPath=C:\\Users\\jenkins\\Miniconda3\\envs\\py3_knime 8 | -------------------------------------------------------------------------------- /workflow-tests/vmargs: -------------------------------------------------------------------------------- 1 | -Dknime.dl.installationtesttimeout=300000 2 | 3 | --------------------------------------------------------------------------------