Git Product home page Git Product logo

co-occurrence-layer.pytorch's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

co-occurrence-layer.pytorch's Issues

πŸš€Need Optimize in quantization input as bins

### Need Optimize:
The code below has some problem.
input_idx = input_norm * (num_quantization - 1)
input_idx = torch.round(input_idx).int()

### For example:
when input_norm is in range of 0-1.
and num_quantization is 4.
the first line of code make input_idx to 0-3
and the second line of code make input_idx to 0, 1, 2, 3

bug the range of 0-0.5 become 0,
and the range 0.5-1.5 become 1,
and 1.5-2.5 to 2,
2.5 - 3 to 3.
which is not uniform.

So it need to optimize.

Case that min-max normalization misfunction

In function_quantization_input_as_bins from src/co_layer.py:
When there's negative value in input, there are chances that min-max normalization misfunction.
Say if tensor A.max()=2, A.min()=-1, then max-min ing element 2 is (2-(-1))/2, which result to a value greater than 1, then this 1 soon is multiplied by num_quantization and then floor to index num_quantizetion, which is out of range of shape.

The author of the paper wants the filter to work on real-world image, in which there're no neg values. But what if we use it in neg-possible input?
In the paper, author said:

Because the input activation values can take any real
value, we quantize them uniformly into k bins. Specifically, we normalize the values of every channel to be in the range [0,1] and then for each x ∈ [0,1], we define the index of x as [x] = round(kx)

Does this problem also exist in the original implementation in tensorflow given by author?

πŸ›bug: RuntimeError: cuDNN error: CUDNN_STATUS_ALLOC_FAILED.

### position:
when train with Conn.

line 39 in co_layer.py: using the index_select function

line 49 in co_layer.py: input_mask = torch.conv3d(input_mask, self.filters_ones, stride=[self.stride, self.stride, self.stride])

### error:
RuntimeError: cuDNN error: CUDNN_STATUS_ALLOC_FAILED
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED

### device:
hpc3 -> GTX 1080Ti

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.