Commit c90b6e4b authored by Margret A. Riegert's avatar Margret A. Riegert
Browse files

Fix relative imports and mixed tabs/spaces


Former-commit-id: 1d2e08f6da9b89da2c19a92c9b56f5a2f5ebe47f [formerly ec12374e8126d161b2a0b442da0d11aad91ea218]
Former-commit-id: 84371e24208feb8f297e76da9b6acb5acd86275f
parent 467c4be8
......@@ -43,24 +43,24 @@ for i in range(len(origLines)):
origImag = float(origLine.split(" ")[1])
nnReal = float(nnLine.split(" ")[0])
nnImag = float(nnLine.split(" ")[1])
nnImag = float(nnLine.split(" ")[1])
diffReal = origReal - nnReal
diffImag = origImag - nnImag
diffReal = origReal - nnReal
diffImag = origImag - nnImag
nominator = math.sqrt(diffReal*diffReal + diffImag*diffImag)
denominator = math.sqrt(origReal*origReal + origImag*origImag)
nominator = math.sqrt(diffReal*diffReal + diffImag*diffImag)
denominator = math.sqrt(origReal*origReal + origImag*origImag)
if(denominator == 0):
if(denominator == 0):
e = 1.0
elif(math.isnan(nominator) or (math.isnan(denominator))):
e = 1.0
elif ((nominator / denominator > 1)):
e = 1.0
else:
e = nominator / denominator
absError += e
elif(math.isnan(nominator) or (math.isnan(denominator))):
e = 1.0
elif ((nominator / denominator > 1)):
e = 1.0
else:
e = nominator / denominator
absError += e
pass;
print(bcolors.FAIL + "*** Error: %1.8f" % (absError/float(len(origLines))) + bcolors.ENDC)
......@@ -4,8 +4,8 @@ Created on Jul 26, 2012
@author: hadianeh
'''
from .JsonCloak.JsonCloak import JsonCloak
from .NeuralParrot.NeuralNet import NeuralNet
from JsonCloak.JsonCloak import JsonCloak
from NeuralParrot.NeuralNet import NeuralNet
import re
class FannNet(object):
......
......@@ -4,7 +4,7 @@ Created on Mar 3, 2012
@author: hadianeh
'''
from .Neuron import Neuron
from Neuron import Neuron
import json
class NeuralNet(object):
......
......@@ -5,7 +5,7 @@ Created on Mar 4, 2012
'''
from random import random
from .Activation import f
from Activation import f
import json
class Neuron(object):
......
......@@ -4,7 +4,7 @@ Created on Mar 3, 2012
@author: hadianeh
'''
from .Neuron import Neuron
from Neuron import Neuron
import json
class NeuralNet(object):
......
......@@ -5,7 +5,7 @@ Created on Mar 4, 2012
'''
from random import random
from .Activation import f
from Activation import f
import json
class Neuron(object):
......
......@@ -4,7 +4,7 @@ Created on Jul 31, 2012
@author: hadianeh
'''
from .Var import Var
from Var import Var
class Code(object):
def __init__(self):
......
......@@ -5,8 +5,8 @@ Created on Jul 30, 2012
'''
import json
from .Var import Var
from .Code import Code
from Var import Var
from Code import Code
class Inst(object):
def __init__(self, opr='', type='s', fn = ''):
......
......@@ -4,7 +4,7 @@ Created on Mar 3, 2012
@author: hadianeh
'''
from .Neuron import Neuron
from Neuron import Neuron
import json
class NeuralNet(object):
......
......@@ -5,7 +5,7 @@ Created on Mar 4, 2012
'''
from random import random
from .Activation import f
from Activation import f
import json
class Neuron(object):
......
......@@ -6,11 +6,11 @@ Created on Jul 30, 2012
import argparse
from .NeuralParrot.NeuralNet import NeuralNet
from .JsonCloak.JsonCloak import JsonCloak
from .Code import Code
from .Inst import Inst
from .Var import Var
from NeuralParrot.NeuralNet import NeuralNet
from JsonCloak.JsonCloak import JsonCloak
from Code import Code
from Inst import Inst
from Var import Var
class ParrotGenerator(object):
def __init__(self, input, output, target, targetConfig):
......
......@@ -4,7 +4,7 @@ Created on Jul 23, 2012
@author: hadianeh
'''
from .JsonCloak.JsonCloak import JsonCloak
from JsonCloak.JsonCloak import JsonCloak
class Config(JsonCloak):
def __init__(self):
......
......@@ -4,8 +4,8 @@ Created on Jul 20, 2012
@author: hadianeh
'''
from .Code import Code
from .Config import Config
from Code import Code
from Config import Config
import os
class ParrotC(object):
......
......@@ -8,7 +8,7 @@ Created on Jul 24, 2012
import argparse
from .ParrotC import ParrotC
from ParrotC import ParrotC
if __name__ == '__main__':
parser = argparse.ArgumentParser(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment