summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/main/java/com/yahoo/tensor/serialization
diff options
context:
space:
mode:
authorJon Bratseth <jonbratseth@yahoo.com>2017-12-18 09:14:37 +0100
committerGitHub <noreply@github.com>2017-12-18 09:14:37 +0100
commit9347da6b81bd1f723d754fea2add617268ea90fa (patch)
tree6b6489e089b2ff9c5d67599d6be55d694c9ee99b /vespajlib/src/main/java/com/yahoo/tensor/serialization
parentdbf5328bdc8daed3e4111742e2f6e0a48277e3d3 (diff)
Revert "Revert "Bratseth/tensorflow models""
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/serialization')
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/serialization/BinaryFormat.java2
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/serialization/DenseBinaryFormat.java6
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/serialization/TypedBinaryFormat.java6
3 files changed, 7 insertions, 7 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/serialization/BinaryFormat.java b/vespajlib/src/main/java/com/yahoo/tensor/serialization/BinaryFormat.java
index e8c425d49e0..416b28afa22 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/serialization/BinaryFormat.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/serialization/BinaryFormat.java
@@ -24,7 +24,7 @@ interface BinaryFormat {
/**
* Deserialize the given binary data into a Tensor object.
- *
+ *
* @param type the expected abstract type of the tensor to serialize, or empty to use type information from the data
* @param buffer the buffer containing the tensor binary data
*/
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/serialization/DenseBinaryFormat.java b/vespajlib/src/main/java/com/yahoo/tensor/serialization/DenseBinaryFormat.java
index 8b7325ec211..aabb53d1c67 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/serialization/DenseBinaryFormat.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/serialization/DenseBinaryFormat.java
@@ -16,9 +16,9 @@ import java.util.Optional;
*
* Sorted dimensions = num_dimensions [dimension_str_len dimension_str_bytes dimension_size_int]*
* Cell_values = [double, double, double, ...]*
- * where values are encoded in order of increasing indexes in each dimension, increasing
+ * where values are encoded in order of increasing indexes in each dimension, increasing
* indexes of later dimensions in the dimension type before earlier.
- *
+ *
* @author bratseth
*/
@Beta
@@ -54,7 +54,7 @@ public class DenseBinaryFormat implements BinaryFormat {
type = optionalType.get();
TensorType serializedType = decodeType(buffer);
if ( ! serializedType.isAssignableTo(type))
- throw new IllegalArgumentException("Type/instance mismatch: A tensor of type " + serializedType +
+ throw new IllegalArgumentException("Type/instance mismatch: A tensor of type " + serializedType +
" cannot be assigned to type " + type);
sizes = sizesFromType(serializedType);
}
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/serialization/TypedBinaryFormat.java b/vespajlib/src/main/java/com/yahoo/tensor/serialization/TypedBinaryFormat.java
index 7467554790a..01a1d023f2b 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/serialization/TypedBinaryFormat.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/serialization/TypedBinaryFormat.java
@@ -46,9 +46,9 @@ public class TypedBinaryFormat {
return result;
}
- /**
- * Decode some data to a tensor
- *
+ /**
+ * Decode some data to a tensor
+ *
* @param type the type to decode and validate to, or empty to use the type given in the data
* @param buffer the buffer containing the data, use GrowableByteByffer.wrap(byte[]) if you have a byte array
* @return the resulting tensor