Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade week08 #453

Merged
merged 3 commits into from
Aug 19, 2020
Merged

upgrade week08 #453

merged 3 commits into from
Aug 19, 2020

Conversation

MichaelSolotky
Copy link

  • Basically made it look more similar to the corresponding PyTorch version (markdown cells were mostly copied from it)
  • Changed a bit the picture from the pytorch version to fit TensorFlow order of dimensions in image tensors

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

week08_pomdp/practice_tensorflow.ipynb Outdated Show resolved Hide resolved
week08_pomdp/practice_tensorflow.ipynb Outdated Show resolved Hide resolved
"from keras.layers import Conv2D, Dense, Flatten\n",
"\n",
"\n",
"class FeedforwardAgent:\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is FeedforwardAgent gone now?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no such architecture in pytorch version, so I thought it's excess here

week08_pomdp/practice_tensorflow.ipynb Outdated Show resolved Hide resolved
@@ -352,9 +372,54 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Actor-critic\n",
"# Actor-critic objective\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this come from the PyTorch version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

Copy link
Collaborator

@dniku dniku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more comments.

Have you tested the updated notebook end-to-end?

@@ -78,7 +82,6 @@
" return env\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above this line, the PyTorch version crops 15px from the top of the image by default. In this version, the default is 5. I'm not sure if that actually matters, but this is non-trivial difference between the two notebooks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more comments.

Have you tested the updated notebook end-to-end?

Yep, I have. Well, the testing was like to check whether learning curves grow and show similar behavior to the PyTorch version, that nothing crashes with restarting and running everything again.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above this line, the PyTorch version crops 15px from the top of the image by default. In this version, the default is 5. I'm not sure if that actually matters, but this is non-trivial difference between the two notebooks.

Yeah, it looks like it came from the previous TensorFlow version. I'll unify them if you want

Copy link
Collaborator

@dniku dniku Aug 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll unify them if you want

Please do.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"\n",
" if i % 100 == 0:\n",
" rewards_history.append(np.mean(evaluate(agent, env, n_games=1)))\n",
" clear_output(True)\n",
" plt.plot(rewards_history, label='rewards')\n",
" plt.plot(rewards_history, label='rewards', linewidth=3)\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the increased linewidth and fontsize really necessary?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary, it just looks better IMHO. It's sometimes more difficult to look at thin lines if one is distant from a display.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't insist btw

@dniku dniku merged commit e1d78e0 into yandexdataschool:tf2.x Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants