#!/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 <http://www.gnu.org/licenses/>. #
-# #
-# Written by Francois Fleuret, (C) Idiap Research Institute #
-# #
-# Contact <francois.fleuret@idiap.ch> for comments & bug reports #
-#########################################################################
+# Any copyright is dedicated to the Public Domain.
+# https://creativecommons.org/publicdomain/zero/1.0/
+
+# Written by Francois Fleuret <francois@fleuret.org>
import argparse, math, sys
from copy import deepcopy
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(),
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(),
)
def __init__(self):
- super(NetForSequencePair, self).__init__()
+ super().__init__()
self.nc = 32
self.nh = 256