コード例 #1
0
def get_model(device):
    """
    Gets the device that the model is running on. Currently running standard linformer
    """
    model = Linformer(input_size=config["dummy_seq_len"], channels=config["dummy_ch"], dim_d=config["dummy_ch"], dim_k=64,dim_ff=64, nhead=4, depth=2, activation="gelu", checkpoint_level="C0", full_attention=True, include_ff=False, parameter_sharing="none")
    model.to(device)
    return model
コード例 #2
0
def get_model(device):
    """
    Gets the device that the model is running on. Currently running standard linformer
    """
    model = Linformer(input_size=config["dummy_seq_len"], channels=config["dummy_ch"], dim_k=64,dim_ff=64, nhead=4, depth=4, activation="gelu", checkpoint_level="C0")
    model.to(device)
    return model