Comments (7)
Hi @kailashg26
Can you give me further information? What Hardware configuration file are you using? What tile configuration file? What layers are you trying to run?
from stonne.
Hello, I'm using it for maddpg -pytorch version
Here by, I attach th MLP model (IN place of Linear, I just did nn.SimulatedLinear and ran the algorithm. But I got the above error (I input the dogsandcats_tile_fc.txt). I'm using this hardware file (maeri_128mses_64_bw.cfg)
maddpg pytorch source code: https://github.com/shariqiqbal2810/maddpg-pytorch
class MLPNetwork(nn.Module):
"""
MLP network (can be used as value or policy)
"""
def __init__(self, input_dim, out_dim, hidden_dim=64, nonlin=F.relu,
constrain_out=False, norm_in=True, discrete_action=True):
"""
Inputs:
input_dim (int): Number of dimensions in input
out_dim (int): Number of dimensions in output
hidden_dim (int): Number of hidden dimensions
nonlin (PyTorch function): Nonlinearity to apply to hidden layers
"""
super(MLPNetwork, self).__init__()
if norm_in: # normalize inputs
self.in_fn = nn.BatchNorm1d(input_dim)
self.in_fn.weight.data.fill_(1)
self.in_fn.bias.data.fill_(0)
else:
self.in_fn = lambda x: x
self.fc1 = nn.Linear(input_dim, hidden_dim)#, '/home/kailash/Desktop/stonne/simulation_files/maeri_128mses_64_bw.cfg', 'dogsandcats_tile_fc.txt', sparsity_ratio=0.0)
self.fc2 = nn.Linear(hidden_dim, hidden_dim)#, '/home/kailash/Desktop/stonne/simulation_files/maeri_128mses_64_bw.cfg', 'dogsandcats_tile_fc.txt', sparsity_ratio=0.0)
self.fc3 = nn.Linear(hidden_dim, out_dim)#, '/home/kailash/Desktop/stonne/simulation_files/maeri_128mses_64_bw.cfg', 'dogsandcats_tile_fc.txt', sparsity_ratio=0.0)
self.nonlin = nonlin
if constrain_out and not discrete_action:
# initialize small to prevent saturation
self.fc3.weight.data.uniform_(-3e-3, 3e-3)
self.out_fn = F.tanh
else: # logits for discrete action (will softmax later)
self.out_fn = lambda x: x
def forward(self, X):
"""
Inputs:
X (PyTorch Matrix): Batch of observations
Outputs:
out (PyTorch Matrix): Output of network (actions, values, etc)
"""
h1 = self.nonlin(self.fc1(self.in_fn(X)))
h2 = self.nonlin(self.fc2(h1))
out = self.out_fn(self.fc3(h2))
return out
from stonne.
Given the above error, I just note that it seems the interface cannot read the tile file (i.e., dogsandcat_tile_fc.txt). Are you sure you are including the file? You are not specifying any path to the file. Is it in your working directory? Remember you can find the file in minibenchmarks folder. Let me know if It works when indicating the whole path to the file.
from stonne.
Hello @francisco-munoz ,
The fix worked. Thanks. I just wanted to ask that if this simulator also works for training process? Because when I train maddpg, I used simulatedlinear for the three layers to start the training for 60k episodes and the lot of output files are generated. So, I wanted to know if my assumptions are right?
Thanks
from stonne.
Hi @kailashg26,
I am happy to hear that. Pytorch-simulator integration is done just for the forward pass. This means that probably you are just simulating the inference procedure of the training process. The backward pass of the training is not being simulated and is running on CPU.
from stonne.
Oh, okay, thanks @francisco-munoz. BTW great work!
from stonne.
Thanks @kailashg26 , really appreciated!!
from stonne.
Related Issues (20)
- stonne_connect compile fail when pytorch compilered with clang++ HOT 1
- `weights_tensorflow.pb` is in owner's trash HOT 4
- `NLP/BERT/` directory is missing HOT 3
- Missing building blocks of SIGMA HOT 2
- Error in installation of vision HOT 1
- Three questions about Utilization HOT 1
- Steps to Install STONNE successfully HOT 3
- Parameter stats_path='.' missing for the SimulatedConv2d HOT 2
- Python-frontend installation errors HOT 3
- Memory leaks during big simulation runs - Destructors not being called HOT 2
- Pytorch Frontend Install Error HOT 5
- Question about the 'simulated_matmul()' HOT 7
- Questions about list of simulated functions HOT 4
- Printing individual time breakup values for the Simulator HOT 3
- Can we implement training on STONNE? HOT 2
- DRAM modeling HOT 4
- STT-RAM Implementation HOT 2
- The unit of data and frequency of the stonne HOT 6
- PyTorch frontend HOT 1
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 stonne.