convert rank 0 shapes to tensorflow shapes correctly
@@ -257,8 +257,13 @@ public class TensorflowGraphConverter {
}
private static Shape toShape(long[] shape) {
+
+ if (shape.length == 0) {
+ return Shape.scalar();
+ } else {
return Shape.make(shape[0], Arrays.copyOfRange(shape, 1, shape.length));
}
+ }
private static String getTensorflowOpName(Vertex vertex) {
return vertex.getUniqueStringReference();
