Skip to content

Commit ad86e09

Browse files
committed
[dynaml-tensorflow]: Updates to TunableTFModel.FitnessFunction class; added type parameter for model output
Signed-off-by: mandar2812 <mandar2812@gmail.com>
1 parent 899a350 commit ad86e09

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dynaml-core/src/main/scala/io/github/mandar2812/dynaml/models/TunableTFModel.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ object TunableTFModel {
211211
* validation data set, fitness functions compute the
212212
* fitness from the predictions and data labels.
213213
* */
214-
type FitnessFunc[TT] = DataPipe[DataSet[(TT, TT)], Double]
214+
type FitnessFunc[ITT, TT] = DataPipe[DataSet[(ITT, TT)], Double]
215215

216216
/**
217217
* <h4>Fitness Function Utility</h4>
@@ -228,10 +228,10 @@ object TunableTFModel {
228228
*
229229
* @param map_func The element-wise map operation to apply to
230230
* */
231-
def apply[TT](
232-
map_func: DataPipe[(TT, TT), Double],
233-
reduce_func: DataPipe2[Double, Double, Double]): FitnessFunc[TT] =
234-
DataPipe((d: DataSet[(TT, TT)]) => d.map(map_func).reduce(reduce_func))
231+
def apply[ITT, TT](
232+
map_func: DataPipe[(ITT, TT), Double],
233+
reduce_func: DataPipe2[Double, Double, Double]): FitnessFunc[ITT, TT] =
234+
DataPipe((d: DataSet[(ITT, TT)]) => d.map(map_func).reduce(reduce_func))
235235

236236
}
237237

0 commit comments

Comments
 (0)