GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — modification for old quantization functions and kernels by wangyida · Pull Request #443 · tiny-dnn/tiny-dnn

Conversation

@wangyida

@wangyida wangyida commented Dec 6, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • rewrite old quantization functions and delete useless functions
  • make fully-connected layer work under quantized mode
  • bias could be treated seperately from fc and conv
  • make conv layer work under quantized mode
  • remove unnecessary ops through networks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mention-bot

mention-bot commented Dec 6, 2016

Copy link
Copy Markdown

@wangyida, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nyanp, @Randl and @rolandpersson to be potential reviewers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@edgarriba edgarriba added the PR: Needs Review label Dec 8, 2016
@edgarriba edgarriba assigned wangyida Dec 12, 2016
@wangyida
wangyida force-pushed the quantize_new branch from 73bcadf to 68ca3a0 Compare December 17, 2016 08:00
@wangyida wangyida added the bug label Dec 18, 2016
@wangyida
wangyida force-pushed the quantize_new branch from a8be77d to bd89d8f Compare December 23, 2016 04:11
wangyida
wangyida commented Dec 23, 2016
View reviewed changes
Comment thread tiny_dnn/core/kernels/tiny_quantized_conv2d_kernel.h
}
}
// Input quantization
vec_t range_in = tensor_range<float_t>(in);

@wangyida wangyida Dec 23, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@edgarriba The range for each input and output tensors should also be stored in tensor to pass to the next layer in tiny-dnn, so do you have some good idea for this data passing strategy on codes? I think it's different from full precision kernels cause new tensors of ranges are introduced there

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@edgarriba edgarriba Dec 24, 2016

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

maybe we can go for a inherited QuantizedTensor or if there is a real need, just add a small attributes to Tensor regarding data ranges.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
wangyida
wangyida commented Dec 23, 2016
View reviewed changes
Comment thread tiny_dnn/core/kernels/tiny_quantized_conv2d_kernel.h

// Transforming dequantize data in uint8_t to flaot,
// this could be removed within concatenated quantized network
a = quantized_tensor_to_float<uint8_t>(a_requantized,

@wangyida wangyida Dec 23, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@bhack @edgarriba The range for each output tensors should also be stored in tensor to pass to the next layer in tiny-dnn, so do you have some good idea for this data passing strategy on codes? I think it's different from full precision kernels cause new tensors of ranges are introduced there as output, so this line of code is not necessary in an efficient quantization structure.
I want to only use a_requantized and range_output_requantized as output tensors.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
wangyida
wangyida commented Dec 23, 2016
View reviewed changes
Comment thread tiny_dnn/core/kernels/tiny_quantized_fully_connected_kernel.h
const int32_t offset_output = 0, mult_output = 1, shift_output = 0;

// Calculating inner product
bool use_gemm = false;

@wangyida wangyida Dec 23, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@beru Here you can modify the option for GEMM utilization

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@beru beru Dec 25, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@wangyida I see. Thank you for the info. So, it looks like gemmlowp is currently off.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@edgarriba
edgarriba force-pushed the master branch from 7fe3c7f to 4d7e6f6 Compare January 4, 2017 16:51
@edgarriba edgarriba mentioned this pull request Jan 17, 2017
Remove dead code and add missing refs for loops #518
Closed
@bhack

bhack commented Jan 17, 2017

Copy link
Copy Markdown
Contributor

What is the status of this? I really hope that we can have last Gsoc efforts in shape and mainlined.Opencv dnn module (not tiny-dnn based) now has Enet that was one of the orginal Gsoc goal in quantized version for mobile with an android example.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

wangyida added 11 commits January 18, 2017 14:02
@wangyida
modification for old quantization functions and kernels
6ef341b
@wangyida
fix bugs in quantized fc foreward pass kernels
1db0482
@wangyida
add bias quantization basic functions
cb8a456
@wangyida
Fix bugs in bias adding function for quantization
183ec7b
@wangyida
standalone bias in quantized fc kernel
14fc6ba
@wangyida
float_t instead of float
d86c0ae
@wangyida
gemm low precision could be applied on fully connected layer
1c08dc5
@wangyida
modify new quantized convolution kernels and test
43672bc
@wangyida
quantized deconv modification for new structure
96d4f3e
@wangyida
tidy for the tensor
b226fae
@wangyida
remove unecessary function
85f18d6
@wangyida
wangyida force-pushed the quantize_new branch from efb7589 to 85f18d6 Compare January 18, 2017 06:19
@wangyida
name bug
11086d9
@bhack bhack mentioned this pull request Jan 31, 2017
Quantization method for conv, deconv and fc layers. #202
Open
@bhack bhack mentioned this pull request Feb 9, 2017
Quantization code performance. #552
Open
@edgarriba

edgarriba commented Jun 28, 2017

Copy link
Copy Markdown
Member

ping @wangyida

do you think you can finish this PR? we need to update the old backend structure

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@edgarriba edgarriba mentioned this pull request Jul 6, 2017
troubles with gemmlowp compiling quantized mnist example #782
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@beru beru beru left review comments
@edgarriba edgarriba edgarriba left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@wangyida wangyida

Labels

bug PR: Needs Review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@wangyida @mention-bot @bhack @edgarriba @beru
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.