Closed LiuTingWed closed 4 years ago
Please kindly refer the original paper, https://arxiv.org/pdf/1806.09055.pdf The darts code is modified from https://github.com/khanrc/pt.darts and https://github.com/quark0/darts. If you have any questions about the search code, feel free to make issues in the original code repo.
hi I have some problem with train_data and validation_data. I want to run this algorithm(Darts) to datasets A ,which is have 2000 picture, validate to dataset B, which is have 400 picture, However, I noticed that in your code about the setting of the validation set, you split the training set in two and use a part for validation. Sorry, this part of the gradient calculation is not too clear to me. i can't not figure out this part
# phase 2. architect step (alpha) alpha_optim.zero_grad() architect.unrolled_backward(trn_X, trn_y, val_X, val_y, lr, w_optim) alpha_optim.step()
and
# compute gradient v_alphas = tuple(self.v_net.alphas()) v_weights = tuple(self.v_net.weights()) v_grads = torch.autograd.grad(loss, v_alphas + v_weights) torch.nn.utils.clip_grad_norm_(v_grads, 5.) dalpha = v_grads[:len(v_alphas)] dw = v_grads[len(v_alphas):]
so, how can i run this algorithm(Darts) to datasets A , validate to dataset B , any suggestion will appreciate