self.head = nn.Linear(embed_dim, num_classes) if num_classes > 0 else nn.Identity() trunc_normal_(self.cls_token, std=.02) def forward_features(self, x): B = x.shape[0] x = self.tokens_to_token(x) cls_tokens = self.cls_token.expand(B, -1, -1) x = torch.cat((cls_to...
from torch.nn.init import trunc_normal_ import warnings import os from natten.functional import natten2dqkrpb, natten2dav #from natten.functional import natten2dqkrpb, natten2dav, from natten.functional import na2d_av, na2d_qk from natten import ( use_fused_na, use_autotuner @@ -10...
"""importtorch.nn.functionalasF# Create grid to sample in micronsgrid = create_grid(um_sizes, desired_res)# d x h x w x 3# Re-express as a torch grid [-1, 1]um_per_px = np.array([um / pxforum, pxinzip(um_sizes, original.shape)]) torch_ones = np.array(um_sizes) /2-...
Can you provide a call stack or anything to help me figure out where you're running into this issue. The title doesn't help. I did just change the name, but the model unit tests pass and I checked it multiple times. Are you sure you have the whole code checked out in sync?
Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up Reseting focus {{ message }} vwxyzjn / summarize_from_feedback_details Public Notifications You must be signed in to change notification settings Fork 14 ...
nn.Parameter(torch.zeros(1, token_nums[0], deconv_dim)) self.pos_emb_2 = nn.Parameter(torch.zeros(1, token_nums[1], dims[0])) self.pos_emb_3 = nn.Parameter(torch.zeros(1, token_nums[2], dims[1])) nn.init.trunc_normal_(self.pos_emb_1, std=0.02) nn.init.trunc_normal_(...