Bozhen Hu
Bozhen Hu
I wonder that why you use y_hat[0][-1], because the first shape of y_hat equals with self.hp.batch_size , why you use every first example to calculate one batch data whether meets...
Do you have revised this in your codes, and does this affect the results?
> I think the if statement in first line is wrong.And my code: > last_words=tf.reshape(y_hat[:,1],[-1,1]) # [N,1] > if tf.reduce_sum(last_words, 0) == self.token2idx[""]: break # [1] if sum=0 May be...
> when update the code of https://kindxiaoming.github.io/pykan/API_demo/API_10_device.html > > from model.train(dataset, opt="LBFGS", steps=50, lamb=5e-5, lamb_entropy=2.); to model.train(dataset, opt="LBFGS", steps=50, lamb=5e-5, lamb_entropy=2., device=device); > > it will work for both cpu...
before this line output, hidden_i, attn_weights = self.onestep(output, hidden_i, src_out_i, vid_out_i, src_mask_i), I add .contiguous() after output and hidden_i as follows: output = torch.from_numpy(outputs).cuda().contiguous() def from_numpy(self, states): return [torch.from_numpy(state).cuda().contiguous() for...
> @bozhenhhu I've tried the method you've suggested, but the code still does not work:( `import math import torch import random import numpy as np from torch import nn import...
criterion = F.mse_loss model_kan = KAN(width=[5, 10, 10, 10, 1], grid=50, k=3, seed=args.seed, device=device) print(model_kan.device) results = model_kan.train(temp_dataset, opt="LBFGS", steps=10, lamb=0.01, loss_fn=criterion, device=device, lamb_entropy=2.) I met the same issue.