diff --git a/ci_build/Dockerfile b/ci_build/Dockerfile index ebde853..0530c0c 100644 --- a/ci_build/Dockerfile +++ b/ci_build/Dockerfile @@ -13,7 +13,6 @@ WORKDIR /tfhs RUN \ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442 && \ - echo 'deb http://download.fpcomplete.com/ubuntu trusty main'| tee /etc/apt/sources.list.d/fpco.list && \ apt-get update && \ apt-get install -y \ # Required by snappy-frames dependency. @@ -23,7 +22,12 @@ RUN \ # Makes stack viable in the container libgmp-dev \ libcurl3-dev \ - stack && \ + # Required for tcp connections by stack (See: https://github.com/tensorflow/haskell/issues/182) + netbase \ + && \ + # Installs stack. + curl -O -L https://github.com/commercialhaskell/stack/releases/download/v1.7.1/stack-1.7.1-linux-x86_64.tar.gz && \ + tar zxf stack-1.7.1-linux-x86_64.tar.gz -C /usr/local/bin stack-1.7.1-linux-x86_64/stack --strip 1 && \ # Installs protoc and the libraries. curl -O -L https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip && \ unzip -d /usr/local protoc-3.2.0-linux-x86_64.zip bin/protoc && \ diff --git a/docker/Dockerfile b/docker/Dockerfile index ac834a5..73ca904 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get install -y \ libgmp-dev \ # Required for locales configuration. locales \ - # Required for tcp connections (See: https://github.com/tensorflow/haskell/issues/182) + # Required for tcp connections by stack (See: https://github.com/tensorflow/haskell/issues/182) netbase # Our MNIST demo program outputs Unicode characters. diff --git a/tensorflow-ops/tests/GradientTest.hs b/tensorflow-ops/tests/GradientTest.hs index 04391f7..4a2c75b 100644 --- a/tensorflow-ops/tests/GradientTest.hs +++ b/tensorflow-ops/tests/GradientTest.hs @@ -397,13 +397,13 @@ testConv2DBackpropInputGrad = testCase "testConv2DBackpropInputGrad" $ do x <- TF.render $ TF.fill conv_out_shape (TF.scalar (1::Float)) let filterShape = TF.vector [2, 2, 1, 1 :: Int32] -- [fh, fw, inc, out] - filter <- TF.render $ TF.fill filterShape (TF.scalar (1::Float)) + filter' <- TF.render $ TF.fill filterShape (TF.scalar (1::Float)) let y = TF.conv2DBackpropInput' ( (TF.opAttr "strides" .~ [1::Int64, 1, 1, 1]) . (TF.opAttr "padding" .~ (BS.pack "VALID")) . (TF.opAttr "data_format" .~ (BS.pack "NHWC")) ) - conv_input_shape filter x + conv_input_shape filter' x [dx] <- TF.gradients y [x] TF.run (dx, TF.shape dx, TF.shape x)