nikitadurasov / masksembles Goto Github PK
View Code? Open in Web Editor NEWOfficial repository for the paper "Masksembles for Uncertainty Estimation" (CVPR 2021).
Home Page: https://www.norange.io/projects/masksembles/
License: MIT License
Official repository for the paper "Masksembles for Uncertainty Estimation" (CVPR 2021).
Home Page: https://www.norange.io/projects/masksembles/
License: MIT License
Hello,
I'm trying to use the layer, and I'm facing the below error:
batch_size = 128
epochs = 5
model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"])
model.fit(x_train, y_train, batch_size=batch_size, epochs=epochs, validation_split=0.1)
InvalidArgumentError: Number of ways to split should evenly divide the split dimension, but got split_dim 0 (size = 29) and num_split 4
[[node sequential_1/masksembles2d/split (defined at /usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/ops.py:1751) ]] [Op:__inference_distributed_function_14069]
My Network looks like this:
model = keras.Sequential(
[
keras.Input(shape=input_shape),
layers.Conv2D(32, kernel_size=(3, 3), activation="elu"),
Masksembles2D(4, 2.0), # adding Masksembles2D
layers.MaxPooling2D(pool_size=(2, 2)),
layers.Conv2D(64, kernel_size=(3, 3), activation="elu"),
Masksembles2D(4, 2.0), # adding Masksembles2D
layers.MaxPooling2D(pool_size=(2, 2)),
layers.Flatten(),
Masksembles1D(4, 2.), # adding Masksembles1D
layers.Dense(num_classes, activation="softmax"),
]
)
model.summary()
My amount of data is 1170 records of train, and 0.1 to the validation.
What should I notice before using this model?
Thanks.
Hi, could this method be applicable to detect the ood samples while classifying the radar signals?
Here is a problem. When result from here fails to produce proper masks -- the number of features in those masks isn't equal to the number of channels required.
The current solution is just to try searching for a new value of scale
parameter via grid-search -- trying values from np.linspace
. This solution is far from perfect since for some function configurations it fails to find proper scale
. Need to implement something more sophisticated like binary search or something so it would work for every possible configuration.
Hi, thank you for your excellent work!
I have read the masksembles layer code, but I have a little issue with understanding how to use it.
Does it mean replacing the dropout layer with masksembles layer in practice?
Could you give a more detailed example?
I have run the following test code sucessfully.
layer = Masksembles1D(20, 10,2.) output=layer(torch.randn([40,20])) print(output)
Hey @nikitadurasov! ๐
When using the Masksembles method, I want to make a distinction between the different types of uncertainty (model/epistemic, label/aleatoric, and distributional/dataset shift). I noticed it wasn't explicitly stated what kind/s of uncertainty were being estimated through this method, but since the experiments focus on OOD detection, would it be fair to say this is mostly for dataset shift?
Repo lacks implementation for Keras / Tensorflow. Need to update code accordingly and write documentation.
Hi,
I have read the paper about masksembles, congratulations for the article. I'm trying to adapt to my problem. In my research, I don't work with images and the shape of the tensor is [B, H, W].
How can I adapt the maskensemble to the shape of my problem?
Hi @nikitadurasov ,
I have a couple of questions about Masksembles:
Best,
Daniel
Hi nice paper.
I was wondering from the methods, could you get a quantified number of uncertainty for the model output?
Hello and thank you for your interesting work !
Small issue though
Hi @nikitadurasov, I need help on how to implement masksembles to a regression problem. I am not using image data. I have a set of features that I am using to predict a continuous dependent variable. First of all, my code implementation does not seem to be working. Moreover, it is still not clear to me how to get the uncertainties on the predictions for this task using masksembles. I think a quick tutorial on how to tackle this kind of task using masksembles will be helpful.
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.