Skip to content
Snippets Groups Projects
Commit 07c3c1b4 authored by Schneider Leo's avatar Schneider Leo
Browse files

datasets

parent 8e58a7c6
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ import torch.nn as nn ...@@ -3,6 +3,7 @@ import torch.nn as nn
import torch import torch
from tape.models.modeling_bert import ProteinBertModel from tape.models.modeling_bert import ProteinBertModel
class PermuteLayer(nn.Module): class PermuteLayer(nn.Module):
def __init__(self, dims): def __init__(self, dims):
super().__init__() super().__init__()
...@@ -102,6 +103,7 @@ class Model_Common_Transformer(nn.Module): ...@@ -102,6 +103,7 @@ class Model_Common_Transformer(nn.Module):
def forward(self, seq, charge): def forward(self, seq, charge):
print(seq.size(),charge.size()) print(seq.size(),charge.size())
print(seq, charge) print(seq, charge)
print(torch.cuda.mem_get_info())
meta_ohe = torch.nn.functional.one_hot(charge - 1, self.charge_max).float() meta_ohe = torch.nn.functional.one_hot(charge - 1, self.charge_max).float()
seq_emb = torch.nn.functional.one_hot(seq, self.nb_aa).float() seq_emb = torch.nn.functional.one_hot(seq, self.nb_aa).float()
print(seq_emb.shape) print(seq_emb.shape)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment