GithubHelp home page GithubHelp logo

sebtheiler / tutorials Goto Github PK

View Code? Open in Web Editor NEW
133.0 8.0 107.0 605 KB

All of the code for my Medium articles

Home Page: https://medium.com/@sebastiankt9

License: MIT License

Jupyter Notebook 86.96% Python 13.04%
education tutorials learning learning-by-doing educational educational-project

tutorials's Introduction

tutorials

All of the code for my Medium articles.

Update (2021/11/28): Unfortunately, I am no longer writing new articles and this repository is no longer being updated. Thank you to everyone who has ever read my pieces! I'm so glad I could share some of my knowledge of AI and data science with you guys! It's been an honor and I'm sad to leave, but I've moved on to other projects now. As such, I can't make any guarantee that the code here is still up to date, and I probably won't reply to any issues/PRs. Thank you again for being here; it's really been my honor. Farewell! And until next time, happy coding!

(I might return one day, but that won't be soon)

My Medium account: https://medium.com/@sebastiankt9

tutorials's People

Contributors

sebtheiler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tutorials's Issues

one question regarding the replay buffer in DQN atari project

In the class "replay buffer", i found there is "states = np.transpose(np.asarray(states), axes=(0, 2, 3, 1))" in the def get_minibatch.
The problem is why transpose needed here? It looks like the original sequence is already correct so don't need transpose operation here.

Many thanks!

Agent learns but fairly well

Hello
firstly, thank you for this tutorial.
I succeeded in making the train_dqn run but the training did not lead to a good result.

Game number: 005100 Frame number: 01981609 Average reward: 22.1 Time taken: 38.0s

Is this normal ?
Do you have any suggestions ?

Thanks

Question regarding the dueling network architecture part

Hi, I found below code in the network part of train_dqn.py

###########################################################

Split into value and advantage streams

val_stream, adv_stream = Lambda(lambda w: tf.split(w, 2, 3))(x) # custom splitting layer
##############################################################################

It looks like the source from hidden network was divided into 2 different partial parts then one feed to state value, another one to adv value. I have also checked other implementations and paper. It looks like each flow should be the complete copy of the hidden layer rather than partial of it. Can i ask why you want to split it rather than feed the same whole data flow to both stat and adv?

Many thanks!
Edward

Problem with DCGANS tutorial

Hi,

I was trying flow the tutorial for the DCGAN but I have hit a problem.

When I run the following line gan_output = discriminator(fake_image)
I get the error Dimensions must be equal, but are 3 and 3072 for 'sequential_5/dense_14/MatMul' (op: 'MatMul') with input shapes: [?,3], [3072,1024].
I have checked the numbers and they line up with what is defined above in the tutorial.

Can you help?

Cheers

More informative console output DQN tutorial

Dear Sebastian Theiler,

thanks for your great DQN tutorial example. I was wondering if it is possible to suppress the output in the console that looks something like:
1/1 [==============================] - 0s 26ms/step
1/1 [==============================] - 0s 25ms/step
1/1 [==============================] - 0s 22ms/step
1/1 [==============================] - 0s 25ms/step
1/1 [==============================] - 0s 23ms/step
1/1 [==============================] - 0s 21ms/step
1/1 [==============================] - 0s 21ms/step
1/1 [==============================] - 0s 22ms/step
1/1 [==============================] - 0s 22ms/step
1/1 [==============================] - 0s 24ms/step
1/1 [==============================] - 0s 23ms/step
1/1 [==============================] - 0s 27ms/step
1/1 [==============================] - 0s 24ms/step
1/1 [==============================] - 0s 24ms/step
1/1 [==============================] - 0s 28ms/step
1/1 [==============================] - 0s 26ms/step
1/1 [==============================] - 0s 25ms/step
1/1 [==============================] - 0s 26ms/step
1/1 [==============================] - 0s 32ms/step
1/1 [==============================] - 0s 25ms/step
1/1 [==============================] - 0s 25ms/step
1/1 [==============================] - 0s 31ms/step
1/1 [==============================] - 0s 28ms/step
1/1 [==============================] - 0s 31ms/step
1/1 [==============================] - 0s 27ms/step
1/1 [==============================] - 0s 34ms/step
1/1 [==============================] - 0s 30ms/step
1/1 [==============================] - 0s 24ms/step
1/1 [==============================] - 0s 25ms/step
1/1 [==============================] - 0s 23ms/step
1/1 [==============================] - 0s 25ms/step
1/1 [==============================] - 0s 24ms/step
1/1 [==============================] - 0s 23ms/step
1/1 [==============================] - 0s 24ms/step
1/1 [==============================] - 0s 22ms/step
1/1 [==============================] - 0s 22ms/step
1/1 [==============================] -

or make it more informative for each line. Seems to come from Keras?

Every once in a while I see a line like

1/1 [==============================] - 0s 24ms/step
1/1 [==============================] - 0s 25ms/step
1/1 [==============================] - 0s 28ms/step
Game number: 000580 Frame number: 00104874 Average reward: 1.3 Time taken: 12.0s
1/1 [==============================] - 0s 29ms/step
1/1 [==============================] - 0s 27ms/step
1/1 [==============================] - 0s 25ms/step
1/1 [==============================] - 0s 30ms/

coming by.

Or is something going horribly wrong in my environment and console output during training should not be looking like this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.