1
0
mirror of https://github.com/tensorflow/haskell.git synced 2024-06-02 11:03:34 +02:00

Restore an unrelated line to the Dockerfile + rollback some misc cleanup

This commit is contained in:
fkm3 2018-05-15 22:49:55 -04:00
parent 578253b488
commit f8614d930a
2 changed files with 5 additions and 4 deletions

View File

@ -12,6 +12,7 @@ ADD . /tfhs
WORKDIR /tfhs
RUN \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442 && \
apt-get update && \
apt-get install -y \
# Required by snappy-frames dependency.

View File

@ -392,9 +392,9 @@ transAttrs a b =
testConv2DBackpropInputGrad :: Test
testConv2DBackpropInputGrad = testCase "testConv2DBackpropInputGrad" $ do
(dx, shapeDX, shapeX) <- TF.runSession $ do
let convInputShape = TF.vector [1, 2, 2, 1 :: Int32] -- [batch, h, w, in_channels]
let convOutShape = TF.vector [1, 1, 1, 1 :: Int32] -- [batch, h, w, out_channels]
x <- TF.render $ TF.fill convOutShape (TF.scalar (1::Float))
let conv_input_shape = TF.vector [1, 2, 2, 1 :: Int32] -- [batch, h, w, in_channels]
let conv_out_shape = TF.vector [1, 1, 1, 1 :: Int32] -- [batch, h, w, out_channels]
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))
@ -403,7 +403,7 @@ testConv2DBackpropInputGrad = testCase "testConv2DBackpropInputGrad" $ do
. (TF.opAttr "padding" .~ (BS.pack "VALID"))
. (TF.opAttr "data_format" .~ (BS.pack "NHWC"))
)
convInputShape filter' x
conv_input_shape filter' x
[dx] <- TF.gradients y [x]
TF.run (dx, TF.shape dx, TF.shape x)