Arquivos
deepforge/test/test-cases/code/basiccontainer.lua
T
Brian Broll 964ebc9714 Added generic container support. Fixes #476 (#891)
* WIP #476 Update 'Container' category and added 'addLayers' set

* WIP #476 Added ContainerLayerDecorator

* WIP #476 Embedded arch editor in decorator

* WIP #476 Shrink the nested layers. Hide on condense

* WIP #476 Fixed positioning of nested layers

* WIP #476 Added background click handling

* WIP #476 alternate colors w/ nested containers

* WIP #476 Fixed nesting viz and layer prompt

* WIP #476 Refactored nested layers

* WIP #476 Added box on hover for nested layers

* WIP #476 Fixed the nested layer hover box position/size

* WIP #476 added button event handling

* WIP #476 Some nested layer creation support

* WIP #476 Fixed nested layer deletion

* WIP #476 prompt layer on first creation

* WIP #476 Fixed horizontal positioning of nested layers

* WIP #476 Fixed nested layer removal

* WIP #476 Fixed reordering nested layers

* WIP #476 Added basic button styling

* WIP #476 Added hint text

* WIP #476 nested layer delete icon

* WIP #476 Fixed hover and added first button

* WIP #476 Fixed the position of the nested layers (w/ attrs)

* WIP #476 more position adjustments

* WIP #476 Fixed add nested layer not updating

* WIP #476 Load nested children eagerly

* WIP #476 Minor aesthetic tweaks

* WIP #476 Fixed attribute field editing (width messing up)

* WIP #476 Added support for container code generation

* WIP #476 Added generic container support to importer

* WIP #476 Moved Concat to 'Simple'

Concat is only implicitly a container in deepforge (the contained
nodes are inferred by the graph structure rather than physically
nested w/in the node)

* WIP #476 Fixed minor code climate issues

* WIP Protected against null id on project unload

* WIP #476 Fixed 'push' of undefined bug in import tests

* WIP #476 Updated tests

* WIP #476 Only reset attr field size if attribute changed

* WIP #476 re-open error fixed

* WIP #476 update territory on creation

* WIP #476 Updated the nested editor height calculation

* WIP #476 Added resnet import example
2016-11-15 18:54:26 -06:00

16 linhas
335 B
Lua

require 'nn'
require 'rnn'
local P0 = nn.Sequential()
P0:add(nn.View(2,5,10):setNumInputDims(20))
local P1 = nn.Sequential()
P1:add(nn.Linear(50, 200))
P1:add(nn.ReLU())
P1:add(nn.Linear(100, 210))
local net = nn.Sequential()
net:add(nn.Linear(100, 200))
net:add(nn.Parallel(100, 200):add(P0):add(P1))
net:add(nn.Sqrt(3))
return net