This commit is contained in:
rmaphoh
2023-01-31 00:47:18 +00:00
parent 7da646d63c
commit ad280cbf1f
9 changed files with 11 additions and 57 deletions
+1 -7
View File
@@ -1,15 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# --------------------------------------------------------
# References:
# DeiT: https://github.com/facebookresearch/deit
# Partly revised by YZ @UCL&Moorfields
# --------------------------------------------------------
import os
import PIL
from torchvision import datasets, transforms
from timm.data import create_transform
from timm.data.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
+1 -7
View File
@@ -1,12 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# --------------------------------------------------------
# References:
# ELECTRA https://github.com/google-research/electra
# BEiT: https://github.com/microsoft/unilm/tree/master/beit
# Partly revised by YZ @UCL&Moorfields
# --------------------------------------------------------
import json
+2 -3
View File
@@ -1,8 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# Partly revised by YZ @UCL&Moorfields
# --------------------------------------------------------
import math
+1 -7
View File
@@ -1,12 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# --------------------------------------------------------
# References:
# DeiT: https://github.com/facebookresearch/deit
# BEiT: https://github.com/microsoft/unilm/tree/master/beit
# Partly revised by YZ @UCL&Moorfields
# --------------------------------------------------------
import builtins
+1 -5
View File
@@ -1,10 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# --------------------------------------------------------
# Position embedding utils
# Partly revised by YZ @UCL&Moorfields
# --------------------------------------------------------
import numpy as np