Comments (1)
If you want to apply different actions on the 3 channels, I think the easiest way is to make different output layers for each channel.
For example, in init function in denoise/MyFCN.py:
conv7_pi_r=chainerrl.policies.SoftmaxPolicy(L.Convolution2D( 64, n_actions, 3, stride=1, pad=1, nobias=False, initialW=w)),
conv7_pi_g=chainerrl.policies.SoftmaxPolicy(L.Convolution2D( 64, n_actions, 3, stride=1, pad=1, nobias=False, initialW=w)),
conv7_pi_b=chainerrl.policies.SoftmaxPolicy(L.Convolution2D( 64, n_actions, 3, stride=1, pad=1, nobias=False, initialW=w)),
conv7_V_r=L.Convolution2D( 64, 1, 3, stride=1, pad=1, nobias=False, initialW=net.layer18.W.data, initial_bias=net.layer18.b.data),
conv7_V_g=L.Convolution2D( 64, 1, 3, stride=1, pad=1, nobias=False, initialW=net.layer18.W.data, initial_bias=net.layer18.b.data),
conv7_V_b=L.Convolution2D( 64, 1, 3, stride=1, pad=1, nobias=False, initialW=net.layer18.W.data, initial_bias=net.layer18.b.data),
and in pi_and_v function:
pout_r = self.conv7_pi_r(h_pi)
pout_g = self.conv7_pi_g(h_pi)
pout_b = self.conv7_pi_b(h_pi)
vout_r = self.conv7_V_r(h_V)
vout_g = self.conv7_V_g(h_V)
vout_b = self.conv7_V_b(h_V)
return pout_r, pout_g, pout_b, vout_r, vout_g, vout_b
Then, modify the pixelwise_a3c.py. You can independently treat pout_r, pout_g, and pout_b in the same manner as pout. The pi_loss is replaced with the sum of pi_loss_r, pi_loss_g, and pi_loss_b. Similarly, you can treat vout_r, vout_g, and vout_b. In this way, you don't have to modify the SoftmaxPolicy layer.
from pixelrl.
Related Issues (13)
- Image Restoration and Color Enhancement? HOT 3
- image compression using PixelRL? HOT 1
- Color images? HOT 1
- Why the FCN needs a pre-trained weight? HOT 7
- What is the moved_image used for? Can you explain the function of state.step() a bit more? HOT 3
- Have you used any pre-trained weights for the colour Enhancement part? HOT 4
- Can pixelRL be combined with GAN? HOT 3
- How to run the code in google colab
- How to run in Colab HOT 6
- Regarding Testing Setup HOT 4
- Why did you augment the test set as well as the training set? And why did that boost the performance of your proposed method? HOT 1
- Reward functions used in image denoising
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixelrl.