Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/Microsoft.ML.Core/Utilities/DoubleParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,6 @@ public static bool TryParse(out Double value, string s, int ichMin, int ichLim,
if (FloatUtils.GetBits(x) != 0 || FloatUtils.GetBits(value) != TopBit || !neg)
{
System.Diagnostics.Debug.WriteLine("*** FloatParser disagrees with Double.TryParse on: {0} ({1} vs {2})", str, FloatUtils.GetBits(x), FloatUtils.GetBits(value));
//if (!_failed)
//{
// // REVIEW: Double.Parse gets several things wrong, like mapping 148e-325 to 0x2 instead of 0x3.
// _failed = true;
// Contracts.Assert(false, string.Format("FloatParser disagrees with Double.TryParse on: {0} ({1} vs {2})", str, FloatUtils.GetBits(x), FloatUtils.GetBits(value)));
//}
}
}
#endif
Expand Down
6 changes: 1 addition & 5 deletions src/Microsoft.ML.Core/Utilities/MathUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,7 @@ public static Float SoftMax(Float[] inputs, int count)

if (count == 1)
return max;

//else if (leng == 2) {
// return SoftMax(inputs[0], inputs[1]);
//}


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blank line with space on it introduced.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the blank line okay as long as the whitespace is removed?That matches the if statement above.

Also, for my own reference, how can you tell there is whitespace? Is it through Visual Studio? Or is there also a way to know through github?

double intermediate = 0.0;
Float cutoff = max - LogTolerance;

Expand Down
273 changes: 5 additions & 268 deletions src/Microsoft.ML.InternalStreams/InternalStreams.cs

Large diffs are not rendered by default.

28 changes: 0 additions & 28 deletions src/Microsoft.ML.InternalStreams/LowFragmentationStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,6 @@ public override void SetLength(long value)
/// <param name="count">the maximum number of bytes to write</param>
public override void Write(byte[] buffer, int offset, int count)
{
// what if it fails?
//try
//{
long next = Position + count;
if (_length > 0 && next >= _length)
{
Expand All @@ -585,11 +582,6 @@ public override void Write(byte[] buffer, int offset, int count)
_position = -1;
base.Write(buffer, offset, count);
_position = next;
//}
//catch
//{
// position = base.Position;
//}
}

/// <summary>
Expand All @@ -598,9 +590,6 @@ public override void Write(byte[] buffer, int offset, int count)
/// <param name="value">the byte to write</param>
public override void WriteByte(byte value)
{
// what if it fails?
//try
//{
long next = Position + 1;
if (_length > 0 && next >= _length)
{
Expand All @@ -613,11 +602,6 @@ public override void WriteByte(byte value)
_position = -1;
base.WriteByte(value);
_position = next;
//}
//catch
//{
// position = base.Position;
//}
}

/// <summary>
Expand Down Expand Up @@ -688,20 +672,13 @@ public override bool CanRead
}
}

// /// <summary>
// /// Get whether the stream can seek - true, but it really cannot.
// /// (CanSeek is stupidly checked by the FileStream Position property
// /// on get, not just set.)
// /// </summary>
/// <summary>
/// Get whether the stream can seek.
/// </summary>
public override bool CanSeek
{
get
{
// do we need to force this to true, or can we rely on it?
//return true;
return base.CanSeek;
}
}
Expand All @@ -713,8 +690,6 @@ public override bool CanWrite
{
get
{
// pass through...
//return true;
return base.CanWrite;
}
}
Expand All @@ -739,15 +714,12 @@ public override long Position
{
get
{
// the efficiency concern is over VerifyOSHandlePosition when the handle is exposed...
//return base.Position;
if (_position < 0)
_position = base.Position;
return _position;
}
set
{
//throw new NotSupportedException("LowFragmentationStream cannot seek");
Seek(value);
}
}
Expand Down
27 changes: 0 additions & 27 deletions src/Microsoft.ML.InternalStreams/TableIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3485,12 +3485,6 @@ private string columnName(int col)
/// <param name="fields">The row to write as an array of fields</param>
public void WriteRow(object[] fields)
{
// widen if needed:
//while (fields.Length > dataTable.Columns.Count)
//{
// DataColumn col = new DataColumn();
// dataTable.Columns.Add(col);
//}
OleDbCommand oleCmd = new OleDbCommand();
oleCmd.Connection = oleConn;
string cmd = "INSERT INTO " + "[Sheet1$] "; // + "(FirstName, LastName) ";
Expand Down Expand Up @@ -3527,22 +3521,6 @@ public void WriteRow(object[] fields)
{
throw new Exception("Excel insert error.");
}

//if (oleAdapter == null) return;
// widen if needed:
//while (fields.Length > dataTable.Columns.Count)
//{
// DataColumn col = new DataColumn();
// dataTable.Columns.Add(col);
//}
//dataTable.LoadDataRow(fields, false);
//for (int i = 0; i < fields.Length; i++)
//{
// if (fields[i] == DBNull.Value)
// {
// fields[i] = null;
// }
//}
}

/// <summary>
Expand All @@ -3560,11 +3538,6 @@ public int RowLength()
/// </summary>
public void Close()
{
//if (oleAdapter != null)
//{
// oleAdapter.Update(dataTable);
// oleAdapter = null;
//}
if (oleConn != null)
{
oleConn.Close();
Expand Down
Loading