Comments (5)
Hi @psteinb
Thanks for pointing this out! Do you have any recommendations on how to deal with this?
I did not want to use a randomly generated image with numpy 1) to ensure consistency over time and 2) to check equivariance on data representing natural images rather than random noise. I also thought it was not a good idea to include images inside the library.
Maybe I will try to use scipy.misc.face()
as a testing image
Thanks,
Gabriele
from escnn.
On this note, I must stress that having code (and data and dependencies) that is mostly used in the test suite in production code, can cause a lot of maintenance harm very quickly. I would advise to make the use of testimage.jpeg
optional or come up with a testimage that can quickly be generated through some lines of numpy. At best, the testimage code is moved into the test
suite and declared as default or something along these lines.
from escnn.
It is hard for me to comment, as I don't know the content of testimage.jpeg
and what it's purpose is. For such test data, indeed scipy.misc.face
or any of the skimage.data
entries will do the trick. For the time being, this is the safest option, I think.
But I still feel troubled that this code resides in the main escnn
folder. It would be great to refactor the check_equivariance
function to an interface like:
def check_equivariance(self, testimage: np.ndarray, atol: float = 0.1, rtol: float = 0.1, assertion: bool = True, verbose: bool = True):
Then in the test
folder, you could compose a python module that provides the testimage for example. This would disentangle this more.
from escnn.
I see your point!
I have replaced the image with scipy.datasets.face
for the moment, but will try to move all the equivariance-check routines in the test
folder in a later release (I don't have time to perform this large refactoring in this moment, but will come back to that as soon as possible).
Thanks again for the useful advices and feedback!
Gabriele
from escnn.
BTW, this file can be found in the e2cnn repo (link).
from escnn.
Related Issues (20)
- Instance Norm as normalization? HOT 4
- What is the intuition behind conditioning the kernel size on the number of rotations in the example script? HOT 2
- check_equivariance test failed HOT 2
- escnn's conv, BN, relu is not equivariant? HOT 3
- Pretrained models for ResNet in SO(2) and SE(3) HOT 4
- Utility functions to save and load instances of Group and Representations HOT 2
- Missing indexing dimensions in GeometricTensors HOT 2
- Batched equivariant maps basis expansion (?) HOT 4
- Improved invariant feature extraction - Improved group pooling
- Migrate unit tests to pytest? HOT 4
- question about the 3D rotation order and the Fourier transformation matrix
- Information bottlenecks without warnings.
- Add LayerNorm layer HOT 2
- Add Unitary Group HOT 1
- Usage equivariant MLP HOT 4
- Multi-gpu training degrades performance HOT 1
- Can escnn be used to process one-dimensional data? HOT 1
- 【Passive Rotation】 HOT 3
- Planar symmetries with staggered grids HOT 1
- wide-resnet N=6 not equivariant
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from escnn.