CS294 | homework for CS294 Fall | Machine Learning library
kandi X-RAY | CS294 Summary
kandi X-RAY | CS294 Summary
homework for CS294 Fall 2017.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Train the model
- Get a TensorFlow Session
- Colorize a string
- Configure output directory
- Dump the log to a table
- Loads a GaussianPolicy from a pickle file
- Create a function from inputs
- R Lrelu
- Constructs an Adam learning optimizer
- Encode a recent observation
- Perform a single step
- WNDense tensor
- Build the graph
- Plot data
- Get a tf session
- Reset the observation buffer
- Dropout
- Shuffle training data
- Dump the contents of the log file
- Given a list of outputs return the topology
- Get all datasets from a given path
- 2D convolutional layer
- Calculate the action given a state
- Batch normalization
- Run an environment
- Reset the environment
- Create a gym env
CS294 Key Features
CS294 Examples and Code Snippets
Community Discussions
Trending Discussions on CS294
QUESTION
First a quick disclaimer would be that I posted this question on Reddit, in the Deep Learning and Learning Machine Learning first, but I thought I might also request your expertise here too. Without further ado:
I am currently challenging myself on this year Deep Unsupervised Learning Course of Berkeley University and although I just started the warmup exercise of week 1, I am already having 'technical' difficulties.
The exercise in question is the "1. Warmup" in the following document: Week 1 Exercises. (My apologies as I am not familiar enough with Reddit formating to seemlessly include images.
In my understanding, we have a variable x
which can take values from 1..100
which a specific probability of being sampled ( defined in sample_data()
function).
The task is therefore to fit a vector of parameters theta
which is passed to a softmax function, and is supposed to give the likelihood of a specific element x_i
to be sampled. Namely, theta_1
should the parameter which "bumps up" the soft-max value corresponding to the variable x = 1
and so on.
Using Tensorflow, I think I was able to create such a model, but when it comes to training, I believe I am missing a crucial point as the program cannot compute gradients with respect to the theta
parameters.
I would like to know if am not misunderstanding the task, and if there is any better method to achieve the result of the exercise.
Here is the code, where the failing par is located from the # Computing gradients
.
ANSWER
Answered 2019-Nov-26 at 08:09Pretty sure nobody is gonna see this, but I thought I might as well bring some closure to this.
First of all, I calculated the gradients by directly deriving its expression from the negative log likelihood of the soft-max value, thus dropping the Tensorflow framework by the same occasion.
Although the results are a little bit under my expectations, the program was able to fit the model to a distribution somewhat similar to the empirical distribution of the sampled data. I guess this is due to the fact that just a 1 dimensional theta parameter vector is not enough to fully model the real data distribution, as well as the finite amount of sampled data.
An updated version of the code:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install CS294
You can use CS294 like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page