flare.module

affine

(affine model num-out in-shape & {:keys [bias?], :or {bias? true}})

graph: returns single output (Wx + b) params: [W b]

comp

(comp & ms)

from-op

(from-op op)

l2-squared-loss

PModule

protocol

A module knows ow to construct a graph for a given input. This is the work-horse for dynamic graph construction.

members

graph

(graph this input)(graph this input1 input2)

build a graph for any input(s)

predict-fn

(predict-fn score-module)

on computed graph, also apply an arg-max operation and return the forward value of that node and converts predicted tensor to clj data. If the value is scalar, unwraps and returns number

If module doesn’t build graph for input, prediciton returns nil.

Will create a cache for this prediction fn to ensure predictions cache and re-use empty tensors in forward pass