mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-23 03:19:44 +01:00
Use newer version of stack in CI (#189)
Required by #187. The version we were using is old enough that it doesn't work with the latest stackage LTS. haskellstack.org says There is also a Ubuntu package for Ubuntu 16.10 and up, but the distribution's Stack version lags behind, ... So, instead of asking them to update it, it's probably better to download the tar of the version we want. Somehow updating stack surfaced a new pedantic warning in GradientTest, so I've fixed that as well.
This commit is contained in:
parent
1829c7ef3c
commit
baa501b262
3 changed files with 9 additions and 5 deletions
|
@ -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 && \
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue