[ 
https://issues.apache.org/jira/browse/SYSTEMML-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16208004#comment-16208004
 ] 

Niketan Pansare commented on SYSTEMML-1965:
-------------------------------------------

My two cents: I think both engine improvement as well as good DML practice go 
hand in hand. If `init` is not the right place, then we should add 
`compute_height` and `compute_width` functions. Having a loop-invariant code 
(as part of reusable function) in the for loop is not advisable even if we fix 
the constant propagation portion of the engine. 

> Refactor nn layers to move the computation in forward/backward function known 
> at compile time to init function
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: SYSTEMML-1965
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-1965
>             Project: SystemML
>          Issue Type: Bug
>            Reporter: Niketan Pansare
>
> Ideally, we should move the computation known at compile time to init layer, 
> rather than keep in the forward function. This reduces recompilation time and 
> also potentially unnecessary instructions. Here is an example snippet from 
> our conv2d layer:
> {code}
> Hout = as.integer(floor((Hin + 2*padh - Hf)/strideh + 1))
> Wout = as.integer(floor((Win + 2*padw - Wf)/stridew + 1))
> {code}
> [~prithvi_r_s] [~dusenberrymw] [~reinwald] do you have any comments or 
> concerns ?
> [~dusenberrymw] do you have free cycles to take this over ?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to