X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=mi_estimator.py;h=47381ef3007bf511341dbb0aa3dbc654a45e29a2;hb=0bf74b10ba4561f11d85f23d5e8f7c2cab25c269;hp=02e9db9c52280850ce24990fcaa5a738631a6b57;hpb=b0e213a468726f721990fdbe0837cc6cdce10427;p=pytorch.git diff --git a/mi_estimator.py b/mi_estimator.py index 02e9db9..47381ef 100755 --- a/mi_estimator.py +++ b/mi_estimator.py @@ -1,22 +1,9 @@ #!/usr/bin/env python -######################################################################### -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the version 3 of the GNU General Public License # -# as published by the Free Software Foundation. # -# # -# This program is distributed in the hope that it will be useful, but # -# WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -# Written by Francois Fleuret, (C) Idiap Research Institute # -# # -# Contact for comments & bug reports # -######################################################################### +# Any copyright is dedicated to the Public Domain. +# https://creativecommons.org/publicdomain/zero/1.0/ + +# Written by Francois Fleuret import argparse, math, sys from copy import deepcopy @@ -239,7 +226,7 @@ def create_sequences_pairs(train = False): class NetForImagePair(nn.Module): def __init__(self): - super(NetForImagePair, self).__init__() + super().__init__() self.features_a = nn.Sequential( nn.Conv2d(1, 16, kernel_size = 5), nn.MaxPool2d(3), nn.ReLU(), @@ -270,7 +257,7 @@ class NetForImagePair(nn.Module): class NetForImageValuesPair(nn.Module): def __init__(self): - super(NetForImageValuesPair, self).__init__() + super().__init__() self.features_a = nn.Sequential( nn.Conv2d(1, 16, kernel_size = 5), nn.MaxPool2d(3), nn.ReLU(), @@ -319,7 +306,7 @@ class NetForSequencePair(nn.Module): ) def __init__(self): - super(NetForSequencePair, self).__init__() + super().__init__() self.nc = 32 self.nh = 256