Dear all,
I'm working with Keras layers in BigDL 2.1.0. I have a problem applying the TimeDistributed to a Dense layer. It raises a type mismatch error:
---
error: type mismatch;
found : com.intel.analytics.bigdl.dllib.keras.layers.Dense[Float]
required: com.intel.analytics.bigdl.dllib.nn.internal.KerasLayer[com.intel.analytics.bigdl.dllib.nn.abstractnn.Activity,com.intel.analytics.bigdl.dllib.tensor.Tensor[Float],Float]
Note: com.intel.analytics.bigdl.dllib.tensor.Tensor[Float] <: com.intel.analytics.bigdl.dllib.nn.abstractnn.Activity (and com.intel.analytics.bigdl.dllib.keras.layers.Dense[Float] <: com.intel.analytics.bigdl.dllib.nn.internal.KerasLayer[com.intel.analytics.bigdl.dllib.tensor.Tensor[Float],com.intel.analytics.bigdl.dllib.tensor.Tensor[Float],Float]), but class KerasLayer is invariant in type A.
You may wish to define A as +A instead. (SLS 4.5)
---
Here is the main code:
===
import com.intel.analytics.bigdl.numeric.NumericFloat
import com.intel.analytics.bigdl.dllib.keras.layers._
import com.intel.analytics.bigdl.dllib.keras.Model
val td = TimeDistributed(Dense(outputDim = 5))
===
I tried to replace Keras-like Dense with BigDL-Dense, or Keras-like TimeDistributed with BigDL-TimeDistributed, but it did not work either.
How should I fix this error? It's great if we have an usage example but I did not find any on the web.
Btw, the latest documentation on ReadTheDocs seems not to be updated with the latest code. There is not any documentation on TimeDistributed.
Thank you very much.
Phuong