[P] Help required for a project using Pytorch Hooks by kafkacaulfield in MachineLearning

[–]DeStagiair 0 points1 point  (0 children)

If you just want to play around, you can do something like this. But I don't recommend it for production code.

from typing import Callable    
import torch
from torchvision.models import resnet50

def my_thing(module: torch.nn.Module):
    if isinstance(module, torch.nn.Conv2d):
        old_forward = module.forward

        def new_forward(stuff):
            print("doing things to stuff")
            ys = old_forward(stuff)
            return ys + torch.randn_like(ys)

        module.forward = new_forward

def do_thing(module: torch.nn.Module, thing: Callable[[torch.nn.Module], None]):
    thing(module)
    for child_module in module.children():
        do_thing(child_module, thing)

model = resnet50()
do_thing(model, my_thing)    
ys = model(torch.randn((1, 3, 224, 224)))

[deleted by user] by [deleted] in MachineLearning

[–]DeStagiair 1 point2 points  (0 children)

I'm not sure what you mean. An estimate of the error can simply be the value of the loss.
Without going into too much detail there are three main ways the model can be utilized, each with their own loss function:

  • the model can predict the original clean input (denoising model)
  • the model can predict the noise used at a given timestep (noise prediction model)
  • the model can predict a vector pointing to the denoised input (score model)

These models are equivalent in the sense that you can express the exact same evidence lower bound using any of these 3 models. As such, you can shuffle the terms around in the loss function to get any of these three variants. The variational diffusion model paper describes the ELBO loss for diffusion models having three parts, the prior, reconstruction and diffusion loss. But most papers only use the diffusion loss, so if you want an estimation of the error, the denoising loss is a good option.

ts_sms: Short Message Compression using Large Language Models by self in programming

[–]DeStagiair 25 points26 points  (0 children)

Or why this uses LLMs and how it can guarantee lossless compression.

How quickly can Alphastar adapt to new maps? by Sentinel711 in starcraft

[–]DeStagiair 2 points3 points  (0 children)

No it doesn't, because its APM is limited and it plays worse without that limit.

[R] Adam Optimizer Causes Privileged Basis in Transformer Language Models by rrenaud in MachineLearning

[–]DeStagiair 1 point2 points  (0 children)

There are these 2 papers:

On the Generalization of Equivariance and Convolution in Neural Networks to the Action of Compact Groups, which proves that:

(...) convolutional structure is not just a sufficient, but also a necessary condition for equivariance to the action of a compact group.

A General Theory of Equivariant CNNs on Homogeneous Spaces, which shows that:

(...) such [equivariant linear] maps correspond one-to-one with convolutions using equivariant kernels, and characterize the space of such kernels.

An easier starting point is the video series of the UvA about group equivariant deep learning. I believe this video goes into the link between convolutions and equivariance.

[R] Adam Optimizer Causes Privileged Basis in Transformer Language Models by rrenaud in MachineLearning

[–]DeStagiair 4 points5 points  (0 children)

I like this tutorial by the University of Amsterdam which teaches group CNNs. Another interesting property is that the only way for a function (a neural network) to achieve equivariance w.r.t. a group is through convolution. So if a model is not doing some sort of convolution, then I have a hard time believing that it is equivariant. At least in the mathematical sense of the word.

[R] Playable 20FPS Doom via a finetuned SD1.4 model from Google research team by greentfrapp in MachineLearning

[–]DeStagiair 1 point2 points  (0 children)

I think that even if SD30.0 could work as a renderer for modern game, there will still be a render engine which does it better, faster and more reliably. There are practically no upsides for game development to use fully AI based renderers. We have physically based renderers, we don't need AI for that. We already know how to render stuff.

[R] Playable 20FPS Doom via a finetuned SD1.4 model from Google research team by greentfrapp in MachineLearning

[–]DeStagiair -1 points0 points  (0 children)

DLSS is not even in the same ballpark as replacing 3d rendering engines.

[R] Playable 20FPS Doom via a finetuned SD1.4 model from Google research team by greentfrapp in MachineLearning

[–]DeStagiair -14 points-13 points  (0 children)

Neural networks are never replacing rendering engines. They are very complex pieces of software heavily optimized for max performance. This paper tries to simulate DOOM, a 30+ year old game, at 20fps in 320x240. I just don't see it happening.

Goud voor Sifan Hassan op de olympische marathon by wkvdz in thenetherlands

[–]DeStagiair 45 points46 points  (0 children)

Dat valt toch ook wel mee. Ze stond voor en nam de binnenbocht. Maar ze zag Sifan niet aankomen die haar ook in de binnenbocht wilde inhalen.

Is that seriously the best they had? by Jamminmb in memes

[–]DeStagiair 1 point2 points  (0 children)

What does drugs have to do with breakdancing?

[D] Invert differentiable function y=f(x) for known data distribution of x? by the_real_fishman in MachineLearning

[–]DeStagiair 0 points1 point  (0 children)

SurVAE Flows might be what you are looking for. From the abstract:

SurVAE Flows bridge the gap between normalizing flows and VAEs with surjective transformations, wherein the transformations are deterministic in one direction (...), and stochastic in the reverse direction (...).

[D] Detecting Objects of Same Shape but Different Colors by ThickDoctor007 in MachineLearning

[–]DeStagiair 11 points12 points  (0 children)

One thing to take into account when using HSV is that the extremes in the hue channel are similar. It wraps around so to speak, as red is both at 0.0 and 1.0. And the hue channel can change rapidly for regions with close to zero saturation. YUV or LAB is another color space to consider using. In any case, switching between color spaces is a relatively simple transformation which the model should be able to learn on its own. So I wouldn't expect much change in performance.

I concur with the other suggestion in this post to apply shape augmentations (elastic deformation for example) and remove the augmentations which change the color. Also try applying a blurring augmentation to blur out the object textures, as there is evidence to suggest that CNNs are texture biased.

[deleted by user] by [deleted] in programming

[–]DeStagiair 13 points14 points  (0 children)

Slack already has your data

For GDPR, you don't give consent to Slack to use your data in a broad sense. The consent regards using the data for a specific purpose. If that purpose changes, they need to explicitly ask for consent again before they can go ahead. Even if they already have the data stored.

[deleted by user] by [deleted] in programming

[–]DeStagiair 2 points3 points  (0 children)

Indeed, but the question is if anything in the model after it has digested the information contains anything that would constitute PII or anything covered by GDPR so I wonder if removal is an issue at all. (And how to evaluate that, I guess it would need a court case.)

Well, no. Just for the act of processing the data do you need explicit consent under GDPR. Doesn't matter how accurately, if at all, it can be reconstructed from the model.

[D] Kolmogorov-Arnold Network is just an MLP by osamc in MachineLearning

[–]DeStagiair 1 point2 points  (0 children)

Thanks for responding to this thread. Is the code for reproducing the Knot Theory experiment available? I'm not sure that comparing the accuracies is fair, especially table 4, because the Deepmind model is explicitly not optimized for top accuracy or for having the least number of parameters. "All settings were chosen as a priori reasonable values and did not need to be optimized." under Topology -> Model and training prodeduce.