Code Monkey home page Code Monkey logo

flexconv's Introduction

Robert-Jan Bruintjes

PhD candidate with Jan van Gemert @ Computer Vision Lab, TU Delft.

I work on supervised representation learning for Computer Vision. My main research is into integrating prior knowledge into Convolutional Neural Networks to benefit data efficiency. Topics of choice include implicit neural convolutional operators, in- and equivariant representations and data-efficiency of self-attention.

More information, including publications, at https://rjbruin.github.io.

flexconv's People

Contributors

dwromero avatar rjbruin avatar trellixvulnteam 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

flexconv's Issues

Simple Example does not work

Hey there!

Thanks for the great work and open source code.

I have tried a very simple example but couldnt get it to work:

import torch
import torch.nn as nn
import torch.nn.functional as F
import ckconv
from ckconv.nn import CKConv
from omegaconf import OmegaConf


kernel_config = OmegaConf.create({"type": "MLP", "dim_linear": 2, "no_hidden": 2, "no_layers": 3, "activ_function": "ReLU","norm": "BatchNorm","omega_0": 1,"learn_omega_0": False,"weight_norm": False,"steerable": False,"init_spatial_value": 1.0,"bias_init": None,"input_scale": 25.6,"sampling_rate_norm": 1.0,"regularize": False,"regularize_params": {"res": 0 ,"res_offset": 0,"target": "gabor+mask","fn": "l2_relu","method":"together","factor": 0.001,"gauss_stddevs": 2.0,"gauss_factor": 0.5},"srf": {"scale": 0.}})


conv_config = OmegaConf.create({"type": "","use_fft": False, "bias": True,"padding": "same","stride": 1,"horizon": "same","cache": False })

class Net(nn.Module):
    def __init__(self):
        super().__init__()
        
        self.conv1 = CKConv(3, 6, kernel_config, conv_config) # nn.Conv2d(3, 6, 5) --> original conv that works
        self.pool = nn.MaxPool2d(2, 2)
        self.conv2 = nn.Conv2d(6, 16, 5)
        self.fc1 = nn.Linear(16 * 5 * 5, 120)
        self.fc2 = nn.Linear(120, 84)
        self.fc3 = nn.Linear(84, 10)

    def forward(self, x):
        print("x: ", x.shape)
        y = self.conv1(x)
        print("y: ", y.shape)
        x = self.pool(F.relu(y))
        x = self.pool(F.relu(self.conv2(x)))
        x = torch.flatten(x, 1) # flatten all dimensions except batch
        x = F.relu(self.fc1(x))
        x = F.relu(self.fc2(x))
        x = self.fc3(x)
        return x


net = Net()


inn = torch.randn((1,3, 28, 28))
out = net(inn)

-->

RuntimeError: Given weight of size [2, 2, 1, 1], expected bias to be 1-dimensional with 2 elements, but got bias of size [2, 2] instead

(you can ignore everything after the first conv, borrowed from pytorch examples)

I tried different configuration (above is only one example).

Thanks for any help :)

Could you give the simple example in 1D case?

Cause I found in the experiments directory :
image

I wonder how to use flexconv to solve the problem:

  1. I have total 20000 nums 1D time series data with channel 21. For example, standard Weather dataset with 20 argument to predict OT.
  2. I have different sequence length, such as [21,4] , [21,6] , [21, 11] . [21, 2]....
  3. I WANT to use the flexconv to finish the work that transforming all the sequence to [21, 8].

Does this case is suitable for flexconv ?
How can I train the flexconv and finish the work above??

Hope for your response!!
Thank you very much for the good job!

Error when run 'run_experiment.py'

Thank you for your nice work and opensource codes!,

It seems that there is something wrong when using the 'srf' lib, the detailed problem is attached below.
image

What does 'high bandwidth' mean in the paper?

Thanks for your great work! I am confused about the definition of 'bandwidth' in the paper; it seems not to be the same as the traditional bandwidth described in here. Can you provide me with a clear definition? Additionally, what factors can impact the 'bandwidth' of a convolutional kernel? How can we quantitatively measure the 'bandwidth'?

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.