Skip to content

Commit

Permalink
remove potential performance downgrader (#2651)
Browse files Browse the repository at this point in the history
* Fix transfer learning (#2645)

* fix transfer learning
* add ParseSingleExample, DecodeBmp tf loader
* add corresponding unit tests

* remove potential performance downgrader
  • Loading branch information
megaSpoon authored Oct 12, 2018
1 parent 1d5a352 commit 4360b99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ object SpatialBatchNormalization {
val offsetOffset = offset.storageOffset() - 1
var isIdenticalScale = false
var identicalScale = 0.0f
if (scale.stride().length == 1 && scale.stride()(0) == 0 && scaleData.length == 1) {

if (scaleData.length == 1) {
isIdenticalScale = true
identicalScale = scaleData(0)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import org.tensorflow.example.Example
class DecodeBmpSerialTest extends ModuleSerializationTest {
private def getInputs(name: String): Tensor[ByteString] = {
import com.intel.analytics.bigdl.utils.tf.TFTensorNumeric.NumericByteString
/* since the tfrecord file is loaded into byteArrays regardless of the
original image type, we can map "bmp" to 0 as well
*/
val index = name match {
case "png" => 0
case "jpeg" => 1
Expand Down

0 comments on commit 4360b99

Please sign in to comment.