Skip to content

Commit c103a38

Browse files
authored
Improve error message.
1 parent ceed3d1 commit c103a38

File tree

1 file changed

+2
-1
lines changed
  • plugins-INDArrayLayers/src/main/scala-2.11/com/thoughtworks/deeplearning/plugins

1 file changed

+2
-1
lines changed

plugins-INDArrayLayers/src/main/scala-2.11/com/thoughtworks/deeplearning/plugins/INDArrayLayers.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ trait INDArrayLayers extends DoubleLayers with DoubleLiterals with ImplicitsSing
103103
}
104104

105105
private def autoBroadcastShape(shape1: Array[Int], shape2: Array[Int]): Array[Int] = {
106-
require(shape1.length == shape2.length)
106+
require(shape1.length == shape2.length,
107+
raw"""Cannot broadcast between shape ${shape1.mkString("[", ",", "]")} and ${shape2.mkString("[", ",", "]")}.""")
107108
shape1.zip(shape2).map {
108109
case (1, bSize) => bSize
109110
case (aSize, 1) => aSize

0 commit comments

Comments
 (0)