Skip to content

Commit abe3e3a

Browse files
committed
okay nan value
1 parent d755796 commit abe3e3a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

lsqr.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
data_t = transforms.Compose([transforms.ToTensor()])
2222
ZDIMS = vae.args.z_dims
2323

24-
2524
model = vae.model
2625
# toggle model to test / inference mode
2726
model.eval()
@@ -31,7 +30,7 @@
3130
if vae.args.cuda:
3231
model.cuda() # need to call this here again
3332

34-
nan_eps = 1e-6 # log(0) does not exist
33+
nan_eps = 1e-6
3534

3635
# idk what to do with epsilon but maybe just add a small constant to the result
3736
def residual(params, cum_area, N, activation, eps):

thesis/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ parameters for the hybrid dataset was not given much priority as the
408408
total loss seemed to shrink with dataset expansion and training and
409409
testing a full model was time expansive.
410410

411+
<!-- Make this a pdf when exporting, maybe in the generate figures.fish thing -->
411412
![bezier\_curve](https://github.com/rien333/numbersense-vae/blob/master/thesis/bezier.png "Bezier curve defining the ratio of natural images over syntethic images at time _t_")
412413

413414
<!-- 🐝 Starting from <img src="https://rawgit.com/rien333/numbersense-vae/master/svgs/f720bb0bc5c021946e95974e4ae6a230.svg?invert_in_darkmode" align=middle width=48.858371099999985pt height=21.18721440000001pt/>, we increase <img src="https://rawgit.com/rien333/numbersense-vae/master/svgs/4f4f4e395762a3af4575de74c019ebb5.svg?invert_in_darkmode" align=middle width=5.936097749999991pt height=20.221802699999984pt/> by <img src="https://rawgit.com/rien333/numbersense-vae/master/svgs/22f2e6fc19e491418d1ec4ee1ef94335.svg?invert_in_darkmode" align=middle width=21.00464354999999pt height=21.18721440000001pt/> for every pasted object, compared to @zhang2016salient's static <img src="https://rawgit.com/rien333/numbersense-vae/master/svgs/f720bb0bc5c021946e95974e4ae6a230.svg?invert_in_darkmode" align=middle width=48.858371099999985pt height=21.18721440000001pt/>, -->

thesis/thesis.md

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ The more mathematical intuition behind FPL is that whatever some hidden layer $l
122122

123123
We follow @zhang2016salient in pretraining our model with synthetic images and later fine-tuning on the SOS dataset. However, some small chances to their synthetic image pretraining setup are proposed. First, the synthetic dataset is extened with natural images from the SOS dataset such that the amount of examples per class per epoch is always equal (hopefully reducing problems encountered with class imbalance, see [section X.X](#imbalance)). Another reason for constructing a hybrid dataset was the fact that the generation process of synthetic images was noted to produes 1. fairly unrealistic looking examples and 2. considerably less suitable than natural data for supporting subitizing performance [@zhang2016salient]. A further intuition behind this dataset is thus that the representation of the VAE must always be at least a little supportive of natural images, instead of settling on some optimum for synthetic images. A final reason for including natural images is that any tested growth in dataset size during pretraining resulted into lower losses. The ratio of natural to synthethic images is increased over time, defined by a bezier curve with parameters $u_0=0, u_1=-0.01, u_2=0.02, u_3=1.0$ shown in figure X.X. We grow the original dataset into a hybrid dataset by roughly 8 times, pretraining with a total of 80000 hybrid samples per epoch. Testing many different parameters for the hybrid dataset was not given much priority as the total loss seemed to shrink with dataset expansion and training and testing a full model was time expansive.
124124

125+
<!-- Make this a pdf when exporting, maybe in the generate figures.fish thing -->
125126
![bezier_curve](https://github.com/rien333/numbersense-vae/blob/master/thesis/bezier.png "Bezier curve defining the ratio of natural images over syntethic images at time _t_")
126127

127128
<!-- 🐝 Starting from $t=0.5$, we increase $t$ by $0.1$ for every pasted object, compared to @zhang2016salient's static $t=0.5$, -->

0 commit comments

Comments
 (0)