dwromero / ckconv Goto Github PK
View Code? Open in Web Editor NEWCode repository of the paper "CKConv: Continuous Kernel Convolution For Sequential Data" published at ICLR 2022. https://arxiv.org/abs/2102.02611
License: MIT License
Code repository of the paper "CKConv: Continuous Kernel Convolution For Sequential Data" published at ICLR 2022. https://arxiv.org/abs/2102.02611
License: MIT License
Hello,
Thank you for your really interesting work. I have a question about the initiation of the CKConv Kernel:
Line 14 in d44c644
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)?
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?
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
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
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
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.
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.
What is the 'intuition' about omega values ? Can they be learned as well ?
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```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.