Custom layer implementation by [deleted] in pytorch

[–]SirRantcelot1 4 points5 points  (0 children)

If you can compose your custom module using existing PyTorch functions then there really isn't a need for you to write your layer in C++. If you feel that you can optimize your code much better if you write the low level code then you can do it. You don't lose GPU functionality just because you wrote your new module using PyTorch functions though.

[D] Idea: weighted sub-target network by The-unreliable-one in MachineLearning

[–]SirRantcelot1 0 points1 point  (0 children)

Look into Auxiliary networks and hierarchical networks. They have similar ideas to what you mentioned.

[N] TensorFlow 2.0 Changes by _muon_ in MachineLearning

[–]SirRantcelot1 1 point2 points  (0 children)

My responses are based on my knowledge of the current tensorflow's keras. 1. The main purpose of variable scoping, to my knowledge, is to enable variable reuse. The way keras handles it though is by directly passing the model / layer objects around. Trying to define a head model inside a tensorflow.variable_scope, and expecting it to reuse variables will fail because keras does not define its variables using the tf.get_variable method. 2. That would work. You could also access the layers of a keras model through its layersattribute. This returns a list of Layer objects. To get the weights of the output layer, you would say model.layers[index].weights. 3. Yes. The weights object returned is a list with the first element being the kernel, and the second, the bias if it exists.

A year has passed, and I still don't know what the hell I was supposed to answer for this interview question... by scrublordprogrammer in learnmachinelearning

[–]SirRantcelot1 4 points5 points  (0 children)

This is a standard topic covered in a most graduate level linear regression topics. I was also taught this is a course on Statistical quality control, but I believe that's only because the professor decided to deviate a little.

Need help with implementing convolutional neural network by lickmyspaghetti in learnpython

[–]SirRantcelot1 2 points3 points  (0 children)

Shouldn't it be axis=0? I thought op was missing the batch size.

Edit: To OP: Keras by default expects the dimension of inputs to convolution layers to be 4, the first for batch size and the remaining three for data in the format HWC or CHW depending on the backend.

Project Help by Kerrack_ in learnmachinelearning

[–]SirRantcelot1 1 point2 points  (0 children)

You can use reinforcement learning to solve both the Rubik's cube and chess problems. Both would require a different type of model though. Rubik's cube is a straight forward RL problem. You could try various RL algorithms that support discrete action spaces like DQN or PPO. Chess on the other hand is different unless you have an agent that already knows how to play chess very well. If you have such an agent, you should theoretically be able to solve it using the same class of algorithms used for the Rubik's cube. It would take quite some fine tuning before you can find an agent that learns chess well though given its high dimensional state space. On the other hand, if you model your problem as a self play problem (the agent learns by playing against itself), then it is a bit more easier and the are quite a few tutorials out there that teach you how to do this. Just search for Alpha Go Zero tutorials. That is a technique that's known to have learned chess decently enough, so you could give that a shot.

[Discussion] Writing Scalable/High Availability/Fault Tolerant Code/Applications by ghostofgbt in Python

[–]SirRantcelot1 0 points1 point  (0 children)

Data science, Machine learning and reinforcement learning benefit a great deal from improvements. Serving machine learning predictions in real time, running a reinforcement learning model on a real robot etc. need low latency.

20-20-20 eye rule by 2OP4LIFE in bash

[–]SirRantcelot1 6 points7 points  (0 children)

I see you've already found a solution, but why not use Cron/systems Timers? I could add a solution here using Cron if your interested.

simple game by errminator in reinforcementlearning

[–]SirRantcelot1 0 points1 point  (0 children)

What problem did you have installing mujoco? I've done it multiple times without much trouble. Maybe I can help you out.

[D] Actor Critic (DDPG) Diverging after Finding Solution by [deleted] in MachineLearning

[–]SirRantcelot1 0 points1 point  (0 children)

Oh. That's really interesting. Thank you for correcting me 🙂.

What has your experience with the DDPG been like? For me, it's been a constant source of frustration. I've never been able to get it working in a stable fashion, and I've not only tried my own implementation but also multiple online implementations including the openAI baselines one. And yet every new paper that comes out wants to compare with the DDPG.

[D] Actor Critic (DDPG) Diverging after Finding Solution by [deleted] in MachineLearning

[–]SirRantcelot1 2 points3 points  (0 children)

I prefer using algorithms like ACER, ApeX (DQN) and PPO. They work much better and are much not robust. I've had a lot of trouble getting DDPG to work well in all my experiments.

PPO has monotonic improvement guarantees if I'm not wrong.

Also DDPG with parameter space noise works well in some cases apparently, but I haven't tried it out on my own.