Skip to content

Commit 551eec5

Browse files
committed
fix video
1 parent c2f6677 commit 551eec5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ molecule
1111
expressiveness
1212
figures
1313
molecule
14+
applications

kan/MultKAN.py

+5
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,10 @@ def closure():
15221522

15231523
if _ == steps-1 and old_save_act:
15241524
self.save_act = True
1525+
1526+
if save_fig and _ % save_fig_freq == 0:
1527+
save_act = self.save_act
1528+
self.save_act = True
15251529

15261530
train_id = np.random.choice(dataset['train_input'].shape[0], batch_size, replace=False)
15271531
test_id = np.random.choice(dataset['test_input'].shape[0], batch_size_test, replace=False)
@@ -1579,6 +1583,7 @@ def closure():
15791583
self.plot(folder=img_folder, in_vars=in_vars, out_vars=out_vars, title="Step {}".format(_), beta=beta)
15801584
plt.savefig(img_folder + '/' + str(_) + '.jpg', bbox_inches='tight', dpi=200)
15811585
plt.close()
1586+
self.save_act = save_act
15821587

15831588
self.log_history('fit')
15841589
# revert back to original state

0 commit comments

Comments
 (0)