update hello.py.
This commit is contained in:
42
hello.py
42
hello.py
@ -23,18 +23,18 @@ import numpy as np
|
|||||||
|
|
||||||
def net():
|
def net():
|
||||||
|
|
||||||
model = ViT(
|
# model = ViT(
|
||||||
image_size = 600,
|
# image_size = 600,
|
||||||
patch_size = 30,
|
# patch_size = 30,
|
||||||
num_classes = 5,
|
# num_classes = 5,
|
||||||
dim = 1024,
|
# dim = 1024,
|
||||||
depth = 6,
|
# depth = 6,
|
||||||
max_tokens_per_depth = (256, 128, 64, 32, 16, 8), # a tuple that denotes the maximum number of tokens that any given layer should have. if the layer has greater than this amount, it will undergo adaptive token sampling
|
# max_tokens_per_depth = (256, 128, 64, 32, 16, 8), # a tuple that denotes the maximum number of tokens that any given layer should have. if the layer has greater than this amount, it will undergo adaptive token sampling
|
||||||
heads = 16,
|
# heads = 16,
|
||||||
mlp_dim = 2048,
|
# mlp_dim = 2048,
|
||||||
dropout = 0.1,
|
# dropout = 0.1,
|
||||||
emb_dropout = 0.1
|
# emb_dropout = 0.1
|
||||||
)
|
# )
|
||||||
|
|
||||||
# modelv = ViT(
|
# modelv = ViT(
|
||||||
# image_size = 600,
|
# image_size = 600,
|
||||||
@ -52,15 +52,15 @@ def net():
|
|||||||
# )
|
# )
|
||||||
|
|
||||||
|
|
||||||
# model = NesT(
|
model = NesT(
|
||||||
# image_size = 600,
|
image_size = 600,
|
||||||
# patch_size = 30,
|
patch_size = 30,
|
||||||
# dim = 256,
|
dim = 256,
|
||||||
# heads = 16,
|
heads = 18,#16
|
||||||
# num_hierarchies = 3, # number of hierarchies
|
num_hierarchies = 3, # number of hierarchies
|
||||||
# block_repeats = (2, 2, 12), # the number of transformer blocks at each heirarchy, starting from the bottom
|
block_repeats = (3, 3, 16), # (2,2,12) the number of transformer blocks at each heirarchy, starting from the bottom
|
||||||
# num_classes = 5
|
num_classes = 5
|
||||||
# )
|
)
|
||||||
|
|
||||||
# model = CrossFormer( #图片尺寸要是7的倍数,如448
|
# model = CrossFormer( #图片尺寸要是7的倍数,如448
|
||||||
# num_classes = 5, # number of output classes
|
# num_classes = 5, # number of output classes
|
||||||
|
Reference in New Issue
Block a user