import torch
import torch.nn as nn
import torch.nn.functional as F

class QNetwork(nn.Module):
    """Actor (Policy) Model."""

    def __init__(self, state_size, action_size, seed):
        """Initialize parameters and build model.
        Params
        ======
            state_size (int): Dimension of each state
            action_size (int): Dimension of each action
            seed (int): Random seed
        """
        super(QNetwork, self).__init__()
        self.seed = torch.manual_seed(seed)
        "*** YOUR CODE HERE ***"
        hidden_layers = [64,64]
        drop_p = 0.5
        #add the first hidden layer
        self.hidden_layers = nn.ModuleList([nn.Linear(state_size, hidden_layers[0])])

        #Add a variable number of hidden layers
        layer_sizes = zip(hidden_layers[:-1], hidden_layers[1:])
        self.hidden_layers.extend([nn.Linear(h1,h2) for h1,h2 in layer_sizes])

        self.output = nn.Linear(hidden_layers[-1], action_size)
        #self.dropout = nn.Dropout(p=drop_p)

    def forward(self, state):
        """Build a network that maps state -> action values."""
        #pass
        #forward through each layer in "hidden layer", with ReLU activation unit between them
        for linear in self.hidden_layers:
            state = F.relu(linear(state))
        
        state = self.output(state)
        return state#F.log_softmax(state, dim=1)
fb60f1d05be5f68f6ad5f3d2a33ccd4272f8ece8
<mask token>


class QNetwork(nn.Module):
    <mask token>
    <mask token>

    def forward(self, state):
        """Build a network that maps state -> action values."""
        for linear in self.hidden_layers:
            state = F.relu(linear(state))
        state = self.output(state)
        return state

<mask token>


class QNetwork(nn.Module):
    <mask token>

    def __init__(self, state_size, action_size, seed):
        """Initialize parameters and build model.
        Params
        ======
            state_size (int): Dimension of each state
            action_size (int): Dimension of each action
            seed (int): Random seed
        """
        super(QNetwork, self).__init__()
        self.seed = torch.manual_seed(seed)
        """*** YOUR CODE HERE ***"""
        hidden_layers = [64, 64]
        drop_p = 0.5
        self.hidden_layers = nn.ModuleList([nn.Linear(state_size,
            hidden_layers[0])])
        layer_sizes = zip(hidden_layers[:-1], hidden_layers[1:])
        self.hidden_layers.extend([nn.Linear(h1, h2) for h1, h2 in layer_sizes]
            )
        self.output = nn.Linear(hidden_layers[-1], action_size)

    def forward(self, state):
        """Build a network that maps state -> action values."""
        for linear in self.hidden_layers:
            state = F.relu(linear(state))
        state = self.output(state)
        return state

<mask token>


class QNetwork(nn.Module):
    """Actor (Policy) Model."""

    def __init__(self, state_size, action_size, seed):
        """Initialize parameters and build model.
        Params
        ======
            state_size (int): Dimension of each state
            action_size (int): Dimension of each action
            seed (int): Random seed
        """
        super(QNetwork, self).__init__()
        self.seed = torch.manual_seed(seed)
        """*** YOUR CODE HERE ***"""
        hidden_layers = [64, 64]
        drop_p = 0.5
        self.hidden_layers = nn.ModuleList([nn.Linear(state_size,
            hidden_layers[0])])
        layer_sizes = zip(hidden_layers[:-1], hidden_layers[1:])
        self.hidden_layers.extend([nn.Linear(h1, h2) for h1, h2 in layer_sizes]
            )
        self.output = nn.Linear(hidden_layers[-1], action_size)

    def forward(self, state):
        """Build a network that maps state -> action values."""
        for linear in self.hidden_layers:
            state = F.relu(linear(state))
        state = self.output(state)
        return state

import torch
import torch.nn as nn
import torch.nn.functional as F


class QNetwork(nn.Module):
    """Actor (Policy) Model."""

    def __init__(self, state_size, action_size, seed):
        """Initialize parameters and build model.
        Params
        ======
            state_size (int): Dimension of each state
            action_size (int): Dimension of each action
            seed (int): Random seed
        """
        super(QNetwork, self).__init__()
        self.seed = torch.manual_seed(seed)
        """*** YOUR CODE HERE ***"""
        hidden_layers = [64, 64]
        drop_p = 0.5
        self.hidden_layers = nn.ModuleList([nn.Linear(state_size,
            hidden_layers[0])])
        layer_sizes = zip(hidden_layers[:-1], hidden_layers[1:])
        self.hidden_layers.extend([nn.Linear(h1, h2) for h1, h2 in layer_sizes]
            )
        self.output = nn.Linear(hidden_layers[-1], action_size)

    def forward(self, state):
        """Build a network that maps state -> action values."""
        for linear in self.hidden_layers:
            state = F.relu(linear(state))
        state = self.output(state)
        return state

import torch
import torch.nn as nn
import torch.nn.functional as F

class QNetwork(nn.Module):
    """Actor (Policy) Model."""

    def __init__(self, state_size, action_size, seed):
        """Initialize parameters and build model.
        Params
        ======
            state_size (int): Dimension of each state
            action_size (int): Dimension of each action
            seed (int): Random seed
        """
        super(QNetwork, self).__init__()
        self.seed = torch.manual_seed(seed)
        "*** YOUR CODE HERE ***"
        hidden_layers = [64,64]
        drop_p = 0.5
        #add the first hidden layer
        self.hidden_layers = nn.ModuleList([nn.Linear(state_size, hidden_layers[0])])

        #Add a variable number of hidden layers
        layer_sizes = zip(hidden_layers[:-1], hidden_layers[1:])
        self.hidden_layers.extend([nn.Linear(h1,h2) for h1,h2 in layer_sizes])

        self.output = nn.Linear(hidden_layers[-1], action_size)
        #self.dropout = nn.Dropout(p=drop_p)

    def forward(self, state):
        """Build a network that maps state -> action values."""
        #pass
        #forward through each layer in "hidden layer", with ReLU activation unit between them
        for linear in self.hidden_layers:
            state = F.relu(linear(state))
        
        state = self.output(state)
        return state#F.log_softmax(state, dim=1)