tensorflow / haskell

Haskell bindings for TensorFlow
https://tensorflow.github.io/haskell/haddock/
Apache License 2.0
1.58k stars 196 forks source link

tensorflow-ops compile error #261

Open erichhasl opened 4 years ago

erichhasl commented 4 years ago

I am trying to build tensorflow with stack version 2.3.1, but I always run into a compiler error when compiling tensorflow-ops:

tensorflow-ops    > configure
tensorflow-ops    > Configuring tensorflow-ops-0.2.0.1...
tensorflow-ops    > build
tensorflow-ops    > Preprocessing library for tensorflow-ops-0.2.0.1..
tensorflow-ops    > Building library for tensorflow-ops-0.2.0.1..
tensorflow-ops    > [1 of 7] Compiling TensorFlow.Ops
tensorflow-ops    > 
tensorflow-ops    > /tmp/stack-af6b60c2d52fc55d/tensorflow-ops-0.2.0.1/src/TensorFlow/Ops.hs:385:33: error:
tensorflow-ops    >     • Couldn't match type ‘Int64’ with ‘Int32’
tensorflow-ops    >       Expected type: Tensor Build Int32
tensorflow-ops    >         Actual type: Tensor Build Int64
tensorflow-ops    >     • In the first argument of ‘CoreOps.fill’, namely ‘(vector s)’
tensorflow-ops    >       In the expression: CoreOps.fill (vector s) (scalar 0)
tensorflow-ops    >       In an equation for ‘zeros’:
tensorflow-ops    >           zeros (Shape s) = CoreOps.fill (vector s) (scalar 0)
tensorflow-ops    >     |
tensorflow-ops    > 385 | zeros (Shape s) = CoreOps.fill (vector s) (scalar 0)
tensorflow-ops    >     |                                 ^^^^^^^^
tensorflow-ops    >

This did not occur, when using docker. I manually installed tensorflow, snappy and protobuf.

blackgnezdo commented 4 years ago

The reason our docker build works is we use a fixed version of tensorflow (the c++ package). Please make sure you use the same version as our docker image.