Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added batchNormLayerNN to replace NN #52

Merged
merged 3 commits into from
Feb 13, 2018

Conversation

DavidBegert
Copy link
Contributor

Makes it much easier to debug and there are probably some optimizations we can do since we know exactly what is contained in batchNormLayerNNs layers

@coveralls
Copy link

coveralls commented Feb 9, 2018

Coverage Status

Coverage increased (+1.05%) to 79.217% when pulling b6e82d6 on DavidBegert:pull-request/b6e82d67 into d45ddf8 on XtractOpen:dev.

@lruthotto
Copy link
Contributor

Looks good to me

@eldadHaber
Copy link
Contributor

eldadHaber commented Feb 9, 2018 via email

tmp[1,1] = Y0
end

Ydata::Array{T,2} = zeros(T,0,nex)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of initializing with 0 rows, you could init it with with how many non zero entries there are in this.outTimes, then the data is pre allocated and you just need to store into it

nex = div(length(Y),nFeatIn(this))
nt = length(this.layers)
cnt = 0
dYdata = zeros(T,0,nex)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

dY = 0*Y
end

dYdata = zeros(T,0,nex)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

for i=nt:-1:1
if this.outTimes[i]==1
nn = nFeatOut(this.layers[i])
W += this.Q'*Wdata[end-cnt2-nn+1:end-cnt2,:]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on how big this sub array is, it might be worth using a @view to avoid the allocation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all things that are also in NN so lets put this on the TODO list and make the changes together

@DavidBegert DavidBegert merged commit 4a783e9 into XtractOpen:dev Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants