This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GCN(tf.Module): | |
def __init__(self, filters, k=7): | |
super(GCN, self).__init__() | |
self.padding_l1 = tf.keras.layers.ZeroPadding2D(padding=((k - 1) // 2, 0)) | |
self.conv_l1 = tf.keras.layers.Conv2D(filters, kernel_size=(k, 1)) | |
self.padding_l2 = tf.keras.layers.ZeroPadding2D(padding=(0, (k - 1) // 2)) | |
self.conv_l2 = tf.keras.layers.Conv2D(filters, kernel_size=(1, k)) | |
self.padding_r1 = tf.keras.layers.ZeroPadding2D(padding=((k - 1) // 2, 0)) | |
self.conv_r1 = tf.keras.layers.Conv2D(filters, kernel_size=(1, k)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2020 by Maksim Kukushkin, The Information Systems Institute, University of Leipzig. | |
# Weather crawler to collect weather data from Wunderground.com | |
# This file is part of the tools used | |
# for master thesis "Flight price prediction and Dynamic Pricing in European low-cost airlines" | |
import csv | |
import json | |
import time | |
from calendar import monthrange |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from collections import OrderedDict | |
from typing import List | |
checkpoints_weights_paths: List[str] = ... # sorted in descending order by score | |
model: torch.nn.Module = ... | |
def average_weights(state_dicts: List[dict]): | |
everage_dict = OrderedDict() |