Giter Club home page Giter Club logo

ckconv's People

Contributors

akuzina avatar dwromero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ckconv's Issues

Use of nn.Conv1d instead of nn.Linear

Hello,

Thank you for your really interesting work. I have a question about the initiation of the CKConv Kernel:

return nn.Conv1d(in_channels, out_channels, kernel_size=1, stride=stride, bias=bias)

In the code as I understand it, a 1 dimensional convolution with a kernel size of 1 is used for the Siren. Could you explain the difference of using this method instead of a regular MLP layer (using for example nn.Linear)?

No module named 'ckconv.nn'

i tried this code, but not working

`import os,sys
ckconv_source = os.path.join(os.getcwd(), '..')
if ckconv_source not in sys.path:
sys.path.append(ckconv_source)

import numpy as np
import torch
from torch.nn.utils import weight_norm
import ckconv
from matplotlib import pyplot as plt
in_channels = 10
out_channels = 10
hidden_channels = 32
activation_function = 'Sine'
norm_type = ''
dim_linear = 1
bias = True
omega_0 = 30.5
weight_dropout = 0.0

ckconv_example = ckconv.CKConv(in_channels,
out_channels,
hidden_channels,
activation_function,
norm_type,
dim_linear,
bias,
omega_0,
weight_dropout,
)`

and then,

ModuleNotFoundError Traceback (most recent call last)
in
7 import torch
8 from torch.nn.utils import weight_norm
----> 9 import ckconv
10 from matplotlib import pyplot as plt
11 in_channels = 10

/home/jihye/ckconv/ckconv/init.py in
----> 1 from .nn import *
2 from .utils import *

/home/jihye/ckconv/ckconv/nn/init.py in
----> 1 from .activation_functions import Swish, Sine
2 from .linear import Linear1d, Linear2d
3 from .norm import LayerNorm
4 from .ckconv import CKConv, KernelNet
5 from .ck_block import CKBlock

/home/jihye/ckconv/ckconv/nn/activation_functions.py in
1 # torch
2 import torch
----> 3 from ckconv.nn.misc import Expression
4
5

ModuleNotFoundError: No module named 'ckconv.nn'

what should i do?

What is the role of `out[:, :, -1]` and why the length of kernel should be equal to input data?

Hello, I've found your work is impressive and still learning it.

I have 2 questions about the code:
(1) In seqImg_CKCNN, the last layer is out = self.finallyr(out[:, :, -1]). It is kind of confusing, because if only the out[:, :, -1] is considered, the convolution operation has no effect and the computation is wasted. In this situation, out[:, :, -1] is the result of point-wise multiply of input (x) and kernel. What is the role of out[:, :, -1] ?

(2) Why the length of kernel should be equal to input data? We all know that the size of standard CNNs should be carefully designed, but the length of kernel in your work is fixed and equal to input data. Why does it work?

Best,
Kzq

Potential applicartion to proteins (long-range interactions)

Hi there!

Very cool work! I'm interested in the potential application of this work to protein structure prediction. I've a repo for doing that with RNNs currently ( https://github.com/hypnopump/rgn2-replica ), and since it's a problem where long-range interactions in sequence space play an important role, I'd like to explore CKCNNs ( I guess they ( https://github.com/dwromero/ckconv/blob/master/models/ckcnn.py#L5 ) could be used as a drop-in replacement for LSTMs here: https://github.com/hypnopump/rgn2-replica/blob/main/rgn2_replica/rgn2.py#L543 )

What do you think? I'd like to read your thoughts on it.

Sincerely,
Eric Alcaide

How to make `seqImg_CKCNN` act causally

Hello,

I've just tried to apply seqImg_CKCNN to a regression task, but the accuracy its achieving indicates the model is not acting causally. Is there something I can change to make the model return causal predictions over the inputs?

In forward method of CKConv it runs through ckconv_f.causal_fftconv(x, conv_kernel, self.bias), suggesting it should be acting causally already, but it appears not to be.

Best,
James

Run on Physionet

Hi,
Thank you for this awesome paper and great repository.
I wanted to try this model on MIMIC III and Physionet datasets and I see that there is a physionet.py file in the datasets folder.
If you already tried this on Physionet I would really appreciate it if you can share your code for running it with the configurations you used?

Thanks.

Performance of model on Physionet

Hi,
I am getting a test AUC of 0.9310 with the pre-trained model you provided on Physionet which is higher than what you reported (0.8965).
How did you get that number? Is there anything that I'm missing?

Thanks,
Iman.

kernelnet_omega_0

What is the 'intuition' about omega values ? Can they be learned as well ?

Error for input channels > 1

https://github.com/dwromero/ckconv/blob/master/demo/construct_your_own_ckconv_layer.ipynb

Changing the input to

# Input:
length = 1000
input_channels = 2
batch_size = 4

input_signal = torch.rand([batch_size, input_channels, length])
output = ckconv1(input_signal)

causes this error:

     87     # 6. Optionally, add a bias term before returning.
     88     if bias is not None:
---> 89         out = out + bias.view(1, -1, 1)
     90 
     91     return out

RuntimeError: The size of tensor a (5) must match the size of tensor b (10) at non-singleton dimension 1```

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.