Skip to content

Commit

Permalink
okay nan value
Browse files Browse the repository at this point in the history
  • Loading branch information
rien333 committed Jun 24, 2018
1 parent d755796 commit abe3e3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lsqr.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
data_t = transforms.Compose([transforms.ToTensor()])
ZDIMS = vae.args.z_dims


model = vae.model
# toggle model to test / inference mode
model.eval()
Expand All @@ -31,7 +30,7 @@
if vae.args.cuda:
model.cuda() # need to call this here again

nan_eps = 1e-6 # log(0) does not exist
nan_eps = 1e-6

# idk what to do with epsilon but maybe just add a small constant to the result
def residual(params, cum_area, N, activation, eps):
Expand Down
1 change: 1 addition & 0 deletions thesis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ 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.

<!-- Make this a pdf when exporting, maybe in the generate figures.fish thing -->
![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_")

<!-- 🐝 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/>, -->
Expand Down
1 change: 1 addition & 0 deletions thesis/thesis.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ The more mathematical intuition behind FPL is that whatever some hidden layer $l

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.

<!-- Make this a pdf when exporting, maybe in the generate figures.fish thing -->
![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_")

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

0 comments on commit abe3e3a

Please sign in to comment.