On this page:
block
block-fn
block-ls
stack-blocks
8.12

16 Building blocks for neural networks🔗ℹ

The type block? consists of two fields, a block function and a block list.

procedure

(block b-fn block-ls)  block?

  b-fn : (-> tensor? (-> (listof tensor?) tensor?))
  block-ls : (listof shape?)
Creates a block from the block function b-fn and the block list block-ls.

procedure

(block-fn b)  (-> tensor? (-> (listof tensor?) tensor?))

  b : block?
Returns the block function from the block b.

procedure

(block-ls b)  (listof shape?)

  b : block?
Returns the block list from the block b.

procedure

(stack-blocks blocks)  block?

  blocks : (listof block?)
Returns a new block where the block function is a composition of the block functions of each block in blocks in the order they appear in blocks, and the block list is created by appending the block lists of each block in blocks in the order they appear in blocks.